Commit 87f7ec4e authored by Tobias Hunger's avatar Tobias Hunger

CMake: Clean up CMakeProject

Some polish for the CMakeProject. Remove unnecessary includes, etc.

Change-Id: I3a73aac79b2177adc613f31865074f778ef21360
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 83b14ec3
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "cmakebuildstep.h" #include "cmakebuildstep.h"
#include "cmakeproject.h" #include "cmakeproject.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
......
...@@ -26,22 +26,13 @@ ...@@ -26,22 +26,13 @@
#pragma once #pragma once
#include "cmake_global.h" #include "cmake_global.h"
#include "cmakeprojectnodes.h"
#include <projectexplorer/extracompiler.h> #include <projectexplorer/extracompiler.h>
#include <projectexplorer/project.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 <utils/fileutils.h>
#include <QFuture> #include <QFuture>
#include <QXmlStreamReader>
#include <QPushButton>
#include <QLineEdit>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QFileSystemWatcher; class QFileSystemWatcher;
...@@ -50,7 +41,6 @@ QT_END_NAMESPACE ...@@ -50,7 +41,6 @@ QT_END_NAMESPACE
namespace CMakeProjectManager { namespace CMakeProjectManager {
namespace Internal { namespace Internal {
class BuildDirManager;
class CMakeFile; class CMakeFile;
class CMakeBuildSettingsWidget; class CMakeBuildSettingsWidget;
class CMakeBuildConfiguration; class CMakeBuildConfiguration;
...@@ -92,22 +82,22 @@ class CMAKE_EXPORT CMakeProject : public ProjectExplorer::Project ...@@ -92,22 +82,22 @@ class CMAKE_EXPORT CMakeProject : public ProjectExplorer::Project
friend class Internal::CMakeBuildSettingsWidget; friend class Internal::CMakeBuildSettingsWidget;
public: public:
CMakeProject(Internal::CMakeManager *manager, const Utils::FileName &filename); 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; QStringList buildTargetTitles(bool runnable = false) const;
QList<CMakeBuildTarget> buildTargets() const; QList<CMakeBuildTarget> buildTargets() const;
bool hasBuildTarget(const QString &title) const; bool hasBuildTarget(const QString &title) const;
CMakeBuildTarget buildTargetForTitle(const QString &title); CMakeBuildTarget buildTargetForTitle(const QString &title);
bool needsConfiguration() const override; bool needsConfiguration() const final;
bool requiresTargetPanel() const override; bool requiresTargetPanel() const final;
bool knowsAllBuildExecutables() const override; 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(); void runCMake();
...@@ -116,8 +106,8 @@ signals: ...@@ -116,8 +106,8 @@ signals:
void parsingStarted(); void parsingStarted();
protected: protected:
RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) override; RestoreResult fromMap(const QVariantMap &map, QString *errorMessage) final;
bool setupTarget(ProjectExplorer::Target *t) override; bool setupTarget(ProjectExplorer::Target *t) final;
private: private:
void handleCmakeFileChanged(); void handleCmakeFileChanged();
...@@ -132,7 +122,7 @@ private: ...@@ -132,7 +122,7 @@ private:
void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list) const; void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list) const;
ProjectExplorer::FolderNode *findOrCreateFolder(Internal::CMakeProjectNode *rootNode, QString directory); ProjectExplorer::FolderNode *findOrCreateFolder(Internal::CMakeProjectNode *rootNode, QString directory);
void createGeneratedCodeModelSupport(); void createGeneratedCodeModelSupport();
QStringList filesGeneratedFrom(const QString &sourceFile) const override; QStringList filesGeneratedFrom(const QString &sourceFile) const final;
void updateTargetRunConfigurations(ProjectExplorer::Target *t); void updateTargetRunConfigurations(ProjectExplorer::Target *t);
void updateApplicationAndDeploymentTargets(); void updateApplicationAndDeploymentTargets();
QStringList getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache); QStringList getCXXFlagsFor(const CMakeBuildTarget &buildTarget, QHash<QString, QStringList> &cache);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment