Commit f69b9948 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Move watcher setup

TO BE SQUASHED LATER!

Change-Id: I055ba795f9b47e7046edc6cb34d3d91ec4419eca
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 2d89f188
......@@ -101,7 +101,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
: m_manager(manager),
m_activeTarget(0),
m_fileName(fileName),
m_rootNode(new CMakeProjectNode(fileName))
m_rootNode(new CMakeProjectNode(fileName)),
m_watcher(new QFileSystemWatcher(this))
{
setProjectContext(Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
......@@ -112,6 +113,8 @@ CMakeProject::CMakeProject(CMakeManager *manager, const QString &fileName)
connect(this, SIGNAL(buildTargetsChanged()),
this, SLOT(updateRunConfigurations()));
connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(fileChanged(QString)));
}
CMakeProject::~CMakeProject()
......@@ -604,9 +607,6 @@ bool CMakeProject::fromMap(const QVariantMap &map)
}
}
m_watcher = new QFileSystemWatcher(this);
connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(fileChanged(QString)));
parseCMakeLists();
if (!hasUserFile && hasBuildTarget(QLatin1String("all"))) {
......
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