forked from qt-creator/qt-creator
CMake: Hide CMakeManager implementation in .cpp
Change-Id: Ia66d73cd060d17c2d25a1d5b89155ab4e7a6b62b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/kitaspects.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectexplorericons.h>
|
||||
@@ -48,6 +49,36 @@ using namespace Utils;
|
||||
|
||||
namespace CMakeProjectManager::Internal {
|
||||
|
||||
class CMakeManager final : public QObject
|
||||
{
|
||||
public:
|
||||
CMakeManager();
|
||||
|
||||
private:
|
||||
void updateCmakeActions(Node *node);
|
||||
void clearCMakeCache(BuildSystem *buildSystem);
|
||||
void runCMake(BuildSystem *buildSystem);
|
||||
void runCMakeWithProfiling(BuildSystem *buildSystem);
|
||||
void rescanProject(BuildSystem *buildSystem);
|
||||
void buildFileContextMenu();
|
||||
void buildFile(Node *node = nullptr);
|
||||
void updateBuildFileAction();
|
||||
void enableBuildFileMenus(Node *node);
|
||||
void reloadCMakePresets();
|
||||
|
||||
QAction *m_runCMakeAction;
|
||||
QAction *m_clearCMakeCacheAction;
|
||||
QAction *m_runCMakeActionContextMenu;
|
||||
QAction *m_rescanProjectAction;
|
||||
QAction *m_buildFileContextMenu;
|
||||
QAction *m_reloadCMakePresetsAction;
|
||||
Utils::ParameterAction *m_buildFileAction;
|
||||
QAction *m_cmakeProfilerAction;
|
||||
QAction *m_cmakeDebuggerAction;
|
||||
QAction *m_cmakeDebuggerSeparator;
|
||||
bool m_canDebugCMake = false;
|
||||
};
|
||||
|
||||
CMakeManager::CMakeManager()
|
||||
{
|
||||
namespace PEC = ProjectExplorer::Constants;
|
||||
@@ -411,4 +442,9 @@ void CMakeManager::buildFileContextMenu()
|
||||
buildFile(node);
|
||||
}
|
||||
|
||||
void setupCMakeManager()
|
||||
{
|
||||
static CMakeManager theCMakeManager;
|
||||
}
|
||||
|
||||
} // CMakeProjectManager::Internal
|
||||
|
||||
Reference in New Issue
Block a user