| 70 | K_PLUGIN_FACTORY_WITH_JSON(CMakeSupportFactory, "kdevcmakemanager.json", registerPlugin<CMakeManager>(); ) |
| 71 | |
| 72 | CMakeManager::CMakeManager(QObject* parent, const KPluginMetaData& metaData, const QVariantList&) |
| 73 | : KDevelop::AbstractFileManagerPlugin(QStringLiteral("kdevcmakemanager"), parent, metaData) |
| 74 | { |
| 75 | if (CMake::findExecutable().isEmpty()) { |
| 76 | setErrorDescription(i18n("Unable to find a CMake executable. Is one installed on the system?")); |
| 77 | m_highlight = nullptr; |
| 78 | return; |
| 79 | } |
| 80 | |
| 81 | m_highlight = new KDevelop::CodeHighlighting(this); |
| 82 | |
| 83 | new CodeCompletion(this, new CMakeCodeCompletionModel(this), name()); |
| 84 | |
| 85 | connect(ICore::self()->projectController(), &IProjectController::projectClosing, this, &CMakeManager::projectClosing); |
| 86 | connect(ICore::self()->runtimeController(), &IRuntimeController::currentRuntimeChanged, this, &CMakeManager::reloadProjects); |
| 87 | connect(this, &KDevelop::AbstractFileManagerPlugin::folderAdded, this, &CMakeManager::folderAdded); |
| 88 | } |
| 89 | |
| 90 | CMakeManager::~CMakeManager() |
| 91 | { |
nothing calls this directly
no test coverage detected