forked from qt-creator/qt-creator
CMake: Clean up CMakeProject
Some polish for the CMakeProject. Remove unnecessary includes, etc. Change-Id: I3a73aac79b2177adc613f31865074f778ef21360 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -26,22 +26,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "cmake_global.h"
|
||||
#include "cmakeprojectnodes.h"
|
||||
|
||||
#include <projectexplorer/extracompiler.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/namedwidget.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QFuture>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QFileSystemWatcher;
|
||||
@@ -50,7 +41,6 @@ QT_END_NAMESPACE
|
||||
namespace CMakeProjectManager {
|
||||
|
||||
namespace Internal {
|
||||
class BuildDirManager;
|
||||
class CMakeFile;
|
||||
class CMakeBuildSettingsWidget;
|
||||
class CMakeBuildConfiguration;
|
||||
@@ -92,22 +82,22 @@ class CMAKE_EXPORT CMakeProject : public ProjectExplorer::Project
|
||||
friend class Internal::CMakeBuildSettingsWidget;
|
||||
public:
|
||||
CMakeProject(Internal::CMakeManager *manager, const Utils::FileName &filename);
|
||||
~CMakeProject() override;
|
||||
~CMakeProject() final;
|
||||
|
||||
QString displayName() const override;
|
||||
QString displayName() const final;
|
||||
|
||||
QStringList files(FilesMode fileMode) const override;
|
||||
QStringList files(FilesMode fileMode) const final;
|
||||
QStringList buildTargetTitles(bool runnable = false) const;
|
||||
QList<CMakeBuildTarget> buildTargets() const;
|
||||
bool hasBuildTarget(const QString &title) const;
|
||||
|
||||
CMakeBuildTarget buildTargetForTitle(const QString &title);
|
||||
|
||||
bool needsConfiguration() const override;
|
||||
bool requiresTargetPanel() const override;
|
||||
bool knowsAllBuildExecutables() const override;
|
||||
bool needsConfiguration() const final;
|
||||
bool requiresTargetPanel() const final;
|
||||
bool knowsAllBuildExecutables() const final;
|
||||
|
||||
bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage = 0) const override;
|
||||
bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage = 0) const final;
|
||||
|
||||
void runCMake();
|
||||
|
||||
@@ -116,8 +106,8 @@ signals:
|
||||
void parsingStarted();
|
||||
|
||||
protected:
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) override;
|
||||
bool setupTarget(ProjectExplorer::Target *t) override;
|
||||
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final;
|
||||
bool setupTarget(ProjectExplorer::Target *t) final;
|
||||
|
||||
private:
|
||||
void handleCmakeFileChanged();
|
||||
@@ -132,7 +122,7 @@ private:
|
||||
void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list) const;
|
||||
ProjectExplorer::FolderNode *findOrCreateFolder(Internal::CMakeProjectNode *rootNode, QString directory);
|
||||
void createGeneratedCodeModelSupport();
|
||||
QStringList filesGeneratedFrom(const QString &sourceFile) const override;
|
||||
QStringList filesGeneratedFrom(const QString &sourceFile) const final;
|
||||
void updateTargetRunConfigurations(ProjectExplorer::Target *t);
|
||||
void updateApplicationAndDeploymentTargets();
|
||||
QStringList getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache);
|
||||
|
||||
Reference in New Issue
Block a user