Commit 6c009f19 authored by ck's avatar ck
Browse files

Maemo: No packaging file watchers for non-Maemo projects.

parent 9d712dee
......@@ -86,9 +86,9 @@ void MaemoTemplatesManager::handleActiveProjectChanged(ProjectExplorer::Project
{
if (m_activeProject)
disconnect(m_activeProject, 0, this, 0);
m_activeProject = project;
delete m_fsWatcher;
m_fsWatcher = 0;
m_activeProject= project;
if (m_activeProject) {
connect(m_activeProject, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(createTemplatesIfNecessary(ProjectExplorer::Target*)));
......@@ -98,17 +98,6 @@ void MaemoTemplatesManager::handleActiveProjectChanged(ProjectExplorer::Project
const QList<Target *> &targets = m_activeProject->targets();
foreach (Target * const target, targets)
createTemplatesIfNecessary(target);
m_fsWatcher = new QFileSystemWatcher(this);
m_fsWatcher->addPath(debianDirPath(m_activeProject));
m_fsWatcher->addPath(changeLogFilePath(m_activeProject));
m_fsWatcher->addPath(controlFilePath(m_activeProject));
connect(m_fsWatcher, SIGNAL(directoryChanged(QString)), this,
SLOT(handleDebianDirContentsChanged()));
connect(m_fsWatcher, SIGNAL(fileChanged(QString)), this,
SLOT(handleDebianFileChanged(QString)));
handleDebianDirContentsChanged();
handleDebianFileChanged(changeLogFilePath(m_activeProject));
handleDebianFileChanged(controlFilePath(m_activeProject));
}
}
......@@ -203,6 +192,18 @@ void MaemoTemplatesManager::createTemplatesIfNecessary(ProjectExplorer::Target *
.arg(QDir::toNativeSeparators(rulesFilePath)));
return;
}
m_fsWatcher = new QFileSystemWatcher(this);
m_fsWatcher->addPath(debianDirPath(m_activeProject));
m_fsWatcher->addPath(changeLogFilePath(m_activeProject));
m_fsWatcher->addPath(controlFilePath(m_activeProject));
connect(m_fsWatcher, SIGNAL(directoryChanged(QString)), this,
SLOT(handleDebianDirContentsChanged()));
connect(m_fsWatcher, SIGNAL(fileChanged(QString)), this,
SLOT(handleDebianFileChanged(QString)));
handleDebianDirContentsChanged();
handleDebianFileChanged(changeLogFilePath(m_activeProject));
handleDebianFileChanged(controlFilePath(m_activeProject));
}
QString MaemoTemplatesManager::version(const Project *project,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment