forked from qt-creator/qt-creator
Project: Improve default implementation of Project::needsConfiguration
Change-Id: Ic4d227334d818658f179c0589462551509274c17 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -361,11 +361,6 @@ CMakeProjectNode *CMakeProject::generateProjectTree(const QList<const FileNode *
|
||||
return root ? root.release() : nullptr;
|
||||
}
|
||||
|
||||
bool CMakeProject::needsConfiguration() const
|
||||
{
|
||||
return targets().isEmpty();
|
||||
}
|
||||
|
||||
bool CMakeProject::knowsAllBuildExecutables() const
|
||||
{
|
||||
return false;
|
||||
|
@@ -68,7 +68,6 @@ public:
|
||||
|
||||
CMakeBuildTarget buildTargetForTitle(const QString &title);
|
||||
|
||||
bool needsConfiguration() const final;
|
||||
bool knowsAllBuildExecutables() const final;
|
||||
|
||||
bool supportsKit(const ProjectExplorer::Kit *k, QString *errorMessage = nullptr) const final;
|
||||
|
@@ -42,6 +42,8 @@ class CPPTOOLS_EXPORT TestProject: public ProjectExplorer::Project
|
||||
public:
|
||||
TestProject(const QString &name, QObject *parent);
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
|
||||
private:
|
||||
QString m_name;
|
||||
};
|
||||
|
@@ -72,11 +72,6 @@ NimProject::NimProject(const FileName &fileName) : Project(Constants::C_NIM_MIME
|
||||
collectProjectFiles();
|
||||
}
|
||||
|
||||
bool NimProject::needsConfiguration() const
|
||||
{
|
||||
return targets().empty();
|
||||
}
|
||||
|
||||
void NimProject::scheduleProjectScan()
|
||||
{
|
||||
auto elapsedTime = m_lastProjectScan.elapsed();
|
||||
|
@@ -41,7 +41,6 @@ class NimProject : public ProjectExplorer::Project
|
||||
public:
|
||||
explicit NimProject(const Utils::FileName &fileName);
|
||||
|
||||
bool needsConfiguration() const final;
|
||||
bool supportsKit(const ProjectExplorer::Kit *k, QString *errorMessage) const final;
|
||||
Utils::FileNameList nimFiles() const;
|
||||
QVariantMap toMap() const final;
|
||||
|
@@ -813,7 +813,7 @@ void Project::setNamedSettings(const QString &name, const QVariant &value)
|
||||
|
||||
bool Project::needsConfiguration() const
|
||||
{
|
||||
return false;
|
||||
return d->m_targets.isEmpty();
|
||||
}
|
||||
|
||||
void Project::configureAsExampleProject(const QSet<Core::Id> &platforms)
|
||||
@@ -933,6 +933,8 @@ public:
|
||||
void testParsingFinished(bool success) {
|
||||
emitParsingFinished(success);
|
||||
}
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
};
|
||||
|
||||
class TestProjectNode : public ProjectNode
|
||||
|
@@ -2219,6 +2219,8 @@ public:
|
||||
TestProject() : Project("x-test/testproject", Utils::FileName::fromString("/test/project")) {
|
||||
setDisplayName("Test Project");
|
||||
}
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@@ -91,6 +91,8 @@ public:
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
void refresh(Target *target = nullptr);
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
|
||||
private:
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) override;
|
||||
bool setupTarget(Target *t)
|
||||
|
@@ -134,7 +134,6 @@ private:
|
||||
|
||||
void projectLoaded() override;
|
||||
ProjectExplorer::ProjectImporter *projectImporter() const override;
|
||||
bool needsConfiguration() const override { return targets().isEmpty(); }
|
||||
|
||||
static bool ensureWriteableQbsFile(const QString &file);
|
||||
|
||||
|
@@ -1025,11 +1025,6 @@ void CentralizedFolderWatcher::delayedFolderChanged(const QString &folder)
|
||||
m_project->updateCodeModels();
|
||||
}
|
||||
|
||||
bool QmakeProject::needsConfiguration() const
|
||||
{
|
||||
return targets().isEmpty();
|
||||
}
|
||||
|
||||
void QmakeProject::configureAsExampleProject(const QSet<Core::Id> &platforms)
|
||||
{
|
||||
QList<const BuildInfo *> infoList;
|
||||
|
@@ -105,8 +105,6 @@ public:
|
||||
void watchFolders(const QStringList &l, QmakePriFile *file);
|
||||
void unwatchFolders(const QStringList &l, QmakePriFile *file);
|
||||
|
||||
bool needsConfiguration() const final;
|
||||
|
||||
void configureAsExampleProject(const QSet<Core::Id> &platforms) final;
|
||||
|
||||
/// \internal
|
||||
|
@@ -64,6 +64,8 @@ public:
|
||||
root->addNode(fileNode);
|
||||
setRootProjectNode(root);
|
||||
}
|
||||
|
||||
bool needsConfiguration() const final { return false; }
|
||||
};
|
||||
|
||||
QmlProfilerDetailsRewriterTest::QmlProfilerDetailsRewriterTest(QObject *parent) : QObject(parent)
|
||||
|
Reference in New Issue
Block a user