From 007d134bc3f77676f5da5c8369b445f810e882f7 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 15 Aug 2019 12:24:47 +0200 Subject: [PATCH] Python: Simplify code based on Project::projectFileIsDirty signal Change-Id: Ife19edf47b903080c073ffef844074be48b65b23 Reviewed-by: hjk --- src/plugins/python/pythonplugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/python/pythonplugin.cpp b/src/plugins/python/pythonplugin.cpp index 81353edf3f1..51ede9b83dd 100644 --- a/src/plugins/python/pythonplugin.cpp +++ b/src/plugins/python/pythonplugin.cpp @@ -413,14 +413,16 @@ public: } }; -PythonProject::PythonProject(const FilePath &fileName) : - Project(Constants::C_PY_MIMETYPE, fileName, [this]() { refresh(); }) +PythonProject::PythonProject(const FilePath &fileName) + : Project(Constants::C_PY_MIMETYPE, fileName) { setId(PythonProjectId); setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID)); setDisplayName(fileName.toFileInfo().completeBaseName()); setNeedsBuildConfigurations(false); + + connect(this, &PythonProject::projectFileIsDirty, this, [this]() { refresh(); }); } static QStringList readLines(const Utils::FilePath &projectFile)