Python: Simplify code based on Project::projectFileIsDirty signal

Change-Id: Ife19edf47b903080c073ffef844074be48b65b23
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-15 12:24:47 +02:00
parent 5a61197b94
commit 007d134bc3

View File

@@ -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)