QmlProject: Simplify code based on Project::projectFileIsDirty signal

Change-Id: I7dfce020d1091044568f5131e5026e0b819b86b9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-15 12:26:14 +02:00
parent 929083e7b6
commit 5a61197b94

View File

@@ -34,7 +34,6 @@
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/documentmanager.h>
#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/kitinformation.h>
@@ -57,9 +56,8 @@ using namespace ProjectExplorer;
namespace QmlProjectManager {
QmlProject::QmlProject(const Utils::FilePath &fileName) :
Project(QString::fromLatin1(Constants::QMLPROJECT_MIMETYPE), fileName,
[this]() { refreshProjectFile(); })
QmlProject::QmlProject(const Utils::FilePath &fileName)
: Project(QString::fromLatin1(Constants::QMLPROJECT_MIMETYPE), fileName)
{
const QString normalized
= Utils::FileUtils::normalizePathName(fileName.toFileInfo().canonicalFilePath());
@@ -70,6 +68,8 @@ QmlProject::QmlProject(const Utils::FilePath &fileName) :
setDisplayName(fileName.toFileInfo().completeBaseName());
setNeedsBuildConfigurations(false);
connect(this, &QmlProject::projectFileIsDirty, this, &QmlProject::refreshProjectFile);
}
QmlProject::~QmlProject()