forked from qt-creator/qt-creator
CMake: Split big plugin tests into smaller pieces
... which can then live closer to the tested code. Change-Id: Icd975a76424ea2258c1bb93afdbaabdf1959340a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -29,7 +29,7 @@ add_qtc_plugin(CMakeProjectManager
|
|||||||
cmakeprojectmanager.cpp cmakeprojectmanager.h
|
cmakeprojectmanager.cpp cmakeprojectmanager.h
|
||||||
cmakeprojectmanagertr.h
|
cmakeprojectmanagertr.h
|
||||||
cmakeprojectnodes.cpp cmakeprojectnodes.h
|
cmakeprojectnodes.cpp cmakeprojectnodes.h
|
||||||
cmakeprojectplugin.cpp cmakeprojectplugin.h
|
cmakeprojectplugin.cpp
|
||||||
cmakesettingspage.cpp cmakesettingspage.h
|
cmakesettingspage.cpp cmakesettingspage.h
|
||||||
cmakespecificsettings.cpp cmakespecificsettings.h
|
cmakespecificsettings.cpp cmakespecificsettings.h
|
||||||
cmaketool.cpp cmaketool.h
|
cmaketool.cpp cmaketool.h
|
||||||
|
@@ -472,18 +472,24 @@ size_t qHash(const CMakeConfigItem &it)
|
|||||||
return ::qHash(it.key) ^ ::qHash(it.value) ^ ::qHash(it.isUnset) ^ ::qHash(it.isInitial);
|
return ::qHash(it.key) ^ ::qHash(it.value) ^ ::qHash(it.isUnset) ^ ::qHash(it.isInitial);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WITH_TESTS
|
|
||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#include "cmakeprojectplugin.h"
|
#if WITH_TESTS
|
||||||
|
|
||||||
#include <QTest>
|
#include <QTest>
|
||||||
|
|
||||||
namespace CMakeProjectManager {
|
namespace CMakeProjectManager::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
void CMakeProjectPlugin::testCMakeSplitValue_data()
|
class CMakeConfigTest final : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void testCMakeSplitValue_data();
|
||||||
|
void testCMakeSplitValue();
|
||||||
|
};
|
||||||
|
|
||||||
|
void CMakeConfigTest::testCMakeSplitValue_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("input");
|
QTest::addColumn<QString>("input");
|
||||||
QTest::addColumn<bool>("keepEmpty");
|
QTest::addColumn<bool>("keepEmpty");
|
||||||
@@ -526,7 +532,7 @@ void CMakeProjectPlugin::testCMakeSplitValue_data()
|
|||||||
<< "C:/something;;/second/path" << true << QStringList({"C:/something", "", "/second/path"});
|
<< "C:/something;;/second/path" << true << QStringList({"C:/something", "", "/second/path"});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeProjectPlugin::testCMakeSplitValue()
|
void CMakeConfigTest::testCMakeSplitValue()
|
||||||
{
|
{
|
||||||
QFETCH(QString, input);
|
QFETCH(QString, input);
|
||||||
QFETCH(bool, keepEmpty);
|
QFETCH(bool, keepEmpty);
|
||||||
@@ -537,7 +543,13 @@ void CMakeProjectPlugin::testCMakeSplitValue()
|
|||||||
QCOMPARE(expectedOutput, realOutput);
|
QCOMPARE(expectedOutput, realOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
QObject *createCMakeConfigTest()
|
||||||
|
{
|
||||||
|
return new CMakeConfigTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // CMakeProjectManager::Internal
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace CMakeProjectManager
|
#include "cmakeconfigitem.moc"
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#include "cmake_global.h"
|
#include "cmake_global.h"
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
#include <QObject>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
@@ -78,4 +79,8 @@ public:
|
|||||||
QString expandedValueOf(const ProjectExplorer::Kit *k, const QByteArray &key) const;
|
QString expandedValueOf(const ProjectExplorer::Kit *k, const QByteArray &key) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
namespace Internal { QObject *createCMakeConfigTest(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
@@ -248,15 +248,23 @@ void CMakeParser::flush()
|
|||||||
} // CMakeProjectManager
|
} // CMakeProjectManager
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
#include "cmakeprojectplugin.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/outputparser_test.h>
|
#include <projectexplorer/outputparser_test.h>
|
||||||
|
|
||||||
#include <QTest>
|
#include <QTest>
|
||||||
|
|
||||||
namespace CMakeProjectManager {
|
namespace CMakeProjectManager::Internal {
|
||||||
|
|
||||||
void Internal::CMakeProjectPlugin::testCMakeParser_data()
|
class CMakeParserTest final : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void testCMakeParser_data();
|
||||||
|
void testCMakeParser();
|
||||||
|
};
|
||||||
|
|
||||||
|
void CMakeParserTest::testCMakeParser_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("input");
|
QTest::addColumn<QString>("input");
|
||||||
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
|
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
|
||||||
@@ -462,7 +470,7 @@ void Internal::CMakeProjectPlugin::testCMakeParser_data()
|
|||||||
<< QString();
|
<< QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Internal::CMakeProjectPlugin::testCMakeParser()
|
void CMakeParserTest::testCMakeParser()
|
||||||
{
|
{
|
||||||
OutputParserTester testbench;
|
OutputParserTester testbench;
|
||||||
testbench.addLineParser(new CMakeParser);
|
testbench.addLineParser(new CMakeParser);
|
||||||
@@ -478,6 +486,13 @@ void Internal::CMakeProjectPlugin::testCMakeParser()
|
|||||||
outputLines);
|
outputLines);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // CMakeProjectManager
|
QObject *createCMakeParserTest()
|
||||||
|
{
|
||||||
|
return new CMakeParserTest;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // CMakeProjectManager::Internal
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "cmakeparser.moc"
|
||||||
|
@@ -53,4 +53,8 @@ private:
|
|||||||
CallStackLine m_errorOrWarningLine;
|
CallStackLine m_errorOrWarningLine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
namespace Internal { QObject *createCMakeParserTest(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
} // CMakeProjectManager
|
} // CMakeProjectManager
|
||||||
|
@@ -1103,14 +1103,23 @@ void CMakeProjectImporter::persistTemporaryCMake(Kit *k, const QVariantList &vl)
|
|||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
|
||||||
#include "cmakeprojectplugin.h"
|
|
||||||
|
|
||||||
#include <QTest>
|
#include <QTest>
|
||||||
|
|
||||||
namespace CMakeProjectManager {
|
namespace CMakeProjectManager::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
void CMakeProjectPlugin::testCMakeProjectImporterQt_data()
|
class CMakeProjectImporterTest final : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void testCMakeProjectImporterQt_data();
|
||||||
|
void testCMakeProjectImporterQt();
|
||||||
|
|
||||||
|
void testCMakeProjectImporterToolchain_data();
|
||||||
|
void testCMakeProjectImporterToolchain();
|
||||||
|
};
|
||||||
|
|
||||||
|
void CMakeProjectImporterTest::testCMakeProjectImporterQt_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QStringList>("cache");
|
QTest::addColumn<QStringList>("cache");
|
||||||
QTest::addColumn<QString>("expectedQmake");
|
QTest::addColumn<QString>("expectedQmake");
|
||||||
@@ -1125,7 +1134,7 @@ void CMakeProjectPlugin::testCMakeProjectImporterQt_data()
|
|||||||
// Everything else will require Qt installations!
|
// Everything else will require Qt installations!
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeProjectPlugin::testCMakeProjectImporterQt()
|
void CMakeProjectImporterTest::testCMakeProjectImporterQt()
|
||||||
{
|
{
|
||||||
QFETCH(QStringList, cache);
|
QFETCH(QStringList, cache);
|
||||||
QFETCH(QString, expectedQmake);
|
QFETCH(QString, expectedQmake);
|
||||||
@@ -1143,7 +1152,7 @@ void CMakeProjectPlugin::testCMakeProjectImporterQt()
|
|||||||
Environment::systemEnvironment());
|
Environment::systemEnvironment());
|
||||||
QCOMPARE(realQmake.path(), expectedQmake);
|
QCOMPARE(realQmake.path(), expectedQmake);
|
||||||
}
|
}
|
||||||
void CMakeProjectPlugin::testCMakeProjectImporterToolchain_data()
|
void CMakeProjectImporterTest::testCMakeProjectImporterToolchain_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QStringList>("cache");
|
QTest::addColumn<QStringList>("cache");
|
||||||
QTest::addColumn<QByteArrayList>("expectedLanguages");
|
QTest::addColumn<QByteArrayList>("expectedLanguages");
|
||||||
@@ -1180,7 +1189,7 @@ void CMakeProjectPlugin::testCMakeProjectImporterToolchain_data()
|
|||||||
<< QStringList({"/usr/bin/g++", "/usr/bin/clang", "/tmp/strange/compiler"});
|
<< QStringList({"/usr/bin/g++", "/usr/bin/clang", "/tmp/strange/compiler"});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeProjectPlugin::testCMakeProjectImporterToolchain()
|
void CMakeProjectImporterTest::testCMakeProjectImporterToolchain()
|
||||||
{
|
{
|
||||||
QFETCH(QStringList, cache);
|
QFETCH(QStringList, cache);
|
||||||
QFETCH(QByteArrayList, expectedLanguages);
|
QFETCH(QByteArrayList, expectedLanguages);
|
||||||
@@ -1205,7 +1214,13 @@ void CMakeProjectPlugin::testCMakeProjectImporterToolchain()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
QObject *createCMakeProjectImporterTest()
|
||||||
} // namespace CMakeProjectManager
|
{
|
||||||
|
return new CMakeProjectImporterTest;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // CMakeProjectManager::Internal
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "cmakeprojectimporter.moc"
|
||||||
|
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "presetsparser.h"
|
|
||||||
|
|
||||||
#include <qtsupport/qtprojectimporter.h>
|
#include <qtsupport/qtprojectimporter.h>
|
||||||
|
|
||||||
#include <utils/temporarydirectory.h>
|
#include <utils/temporarydirectory.h>
|
||||||
@@ -51,5 +49,9 @@ private:
|
|||||||
Utils::TemporaryDirectory m_presetsTempDir;
|
Utils::TemporaryDirectory m_presetsTempDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
QObject *createCMakeProjectImporterTest();
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
@@ -56,7 +56,6 @@ QtcPlugin {
|
|||||||
"cmakeprojectnodes.cpp",
|
"cmakeprojectnodes.cpp",
|
||||||
"cmakeprojectnodes.h",
|
"cmakeprojectnodes.h",
|
||||||
"cmakeprojectplugin.cpp",
|
"cmakeprojectplugin.cpp",
|
||||||
"cmakeprojectplugin.h",
|
|
||||||
"cmaketool.cpp",
|
"cmaketool.cpp",
|
||||||
"cmaketool.h",
|
"cmaketool.h",
|
||||||
"cmaketoolmanager.cpp",
|
"cmaketoolmanager.cpp",
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
// Copyright (C) 2016 The Qt Company Ltd.
|
// Copyright (C) 2016 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "cmakeprojectplugin.h"
|
|
||||||
|
|
||||||
#include "cmakebuildconfiguration.h"
|
#include "cmakebuildconfiguration.h"
|
||||||
#include "cmakebuildstep.h"
|
#include "cmakebuildstep.h"
|
||||||
#include "cmakebuildsystem.h"
|
#include "cmakebuildsystem.h"
|
||||||
@@ -10,8 +8,10 @@
|
|||||||
#include "cmakeformatter.h"
|
#include "cmakeformatter.h"
|
||||||
#include "cmakeinstallstep.h"
|
#include "cmakeinstallstep.h"
|
||||||
#include "cmakelocatorfilter.h"
|
#include "cmakelocatorfilter.h"
|
||||||
|
#include "cmakeparser.h"
|
||||||
#include "cmakeproject.h"
|
#include "cmakeproject.h"
|
||||||
#include "cmakeprojectconstants.h"
|
#include "cmakeprojectconstants.h"
|
||||||
|
#include "cmakeprojectimporter.h"
|
||||||
#include "cmakeprojectmanager.h"
|
#include "cmakeprojectmanager.h"
|
||||||
#include "cmakeprojectmanagertr.h"
|
#include "cmakeprojectmanagertr.h"
|
||||||
#include "cmakeprojectnodes.h"
|
#include "cmakeprojectnodes.h"
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
|
|
||||||
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/projectmanager.h>
|
#include <projectexplorer/projectmanager.h>
|
||||||
#include <projectexplorer/projecttree.h>
|
#include <projectexplorer/projecttree.h>
|
||||||
@@ -66,64 +68,79 @@ public:
|
|||||||
CMakeFormatter cmakeFormatter;
|
CMakeFormatter cmakeFormatter;
|
||||||
};
|
};
|
||||||
|
|
||||||
CMakeProjectPlugin::~CMakeProjectPlugin()
|
class CMakeProjectPlugin final : public ExtensionSystem::IPlugin
|
||||||
{
|
{
|
||||||
delete d;
|
Q_OBJECT
|
||||||
}
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CMakeProjectManager.json")
|
||||||
|
|
||||||
void CMakeProjectPlugin::initialize()
|
~CMakeProjectPlugin()
|
||||||
{
|
{
|
||||||
d = new CMakeProjectPluginPrivate;
|
delete d;
|
||||||
|
}
|
||||||
|
|
||||||
const Context projectContext{CMakeProjectManager::Constants::CMAKE_PROJECT_ID};
|
void initialize() final
|
||||||
|
{
|
||||||
|
d = new CMakeProjectPluginPrivate;
|
||||||
|
|
||||||
FileIconProvider::registerIconOverlayForSuffix(Constants::Icons::FILE_OVERLAY, "cmake");
|
#ifdef WITH_TESTS
|
||||||
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::FILE_OVERLAY,
|
addTestCreator(createCMakeConfigTest);
|
||||||
"CMakeLists.txt");
|
addTestCreator(createCMakeParserTest);
|
||||||
|
addTestCreator(createCMakeProjectImporterTest);
|
||||||
|
#endif
|
||||||
|
|
||||||
TextEditor::SnippetProvider::registerGroup(Constants::CMAKE_SNIPPETS_GROUP_ID,
|
const Context projectContext{CMakeProjectManager::Constants::CMAKE_PROJECT_ID};
|
||||||
Tr::tr("CMake", "SnippetProvider"));
|
|
||||||
ProjectManager::registerProjectType<CMakeProject>(Utils::Constants::CMAKE_PROJECT_MIMETYPE);
|
|
||||||
|
|
||||||
//register actions
|
FileIconProvider::registerIconOverlayForSuffix(Constants::Icons::FILE_OVERLAY, "cmake");
|
||||||
Command *command = ActionManager::registerAction(&d->buildTargetContextAction,
|
FileIconProvider::registerIconOverlayForFilename(Constants::Icons::FILE_OVERLAY,
|
||||||
Constants::BUILD_TARGET_CONTEXT_MENU,
|
"CMakeLists.txt");
|
||||||
projectContext);
|
|
||||||
command->setAttribute(Command::CA_Hide);
|
|
||||||
command->setAttribute(Command::CA_UpdateText);
|
|
||||||
command->setDescription(d->buildTargetContextAction.text());
|
|
||||||
|
|
||||||
ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT)
|
TextEditor::SnippetProvider::registerGroup(Constants::CMAKE_SNIPPETS_GROUP_ID,
|
||||||
|
Tr::tr("CMake", "SnippetProvider"));
|
||||||
|
ProjectManager::registerProjectType<CMakeProject>(Utils::Constants::CMAKE_PROJECT_MIMETYPE);
|
||||||
|
|
||||||
|
//register actions
|
||||||
|
Command *command = ActionManager::registerAction(&d->buildTargetContextAction,
|
||||||
|
Constants::BUILD_TARGET_CONTEXT_MENU,
|
||||||
|
projectContext);
|
||||||
|
command->setAttribute(Command::CA_Hide);
|
||||||
|
command->setAttribute(Command::CA_UpdateText);
|
||||||
|
command->setDescription(d->buildTargetContextAction.text());
|
||||||
|
|
||||||
|
ActionManager::actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT)
|
||||||
->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
|
->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
|
||||||
|
|
||||||
// Wire up context menu updates:
|
// Wire up context menu updates:
|
||||||
connect(ProjectTree::instance(), &ProjectTree::currentNodeChanged,
|
connect(ProjectTree::instance(), &ProjectTree::currentNodeChanged,
|
||||||
this, &CMakeProjectPlugin::updateContextActions);
|
this, &CMakeProjectPlugin::updateContextActions);
|
||||||
|
|
||||||
connect(&d->buildTargetContextAction, &ParameterAction::triggered, this, [] {
|
connect(&d->buildTargetContextAction, &ParameterAction::triggered, this, [] {
|
||||||
if (auto bs = qobject_cast<CMakeBuildSystem *>(ProjectTree::currentBuildSystem())) {
|
if (auto bs = qobject_cast<CMakeBuildSystem *>(ProjectTree::currentBuildSystem())) {
|
||||||
auto targetNode = dynamic_cast<const CMakeTargetNode *>(ProjectTree::currentNode());
|
auto targetNode = dynamic_cast<const CMakeTargetNode *>(ProjectTree::currentNode());
|
||||||
bs->buildCMakeTarget(targetNode ? targetNode->displayName() : QString());
|
bs->buildCMakeTarget(targetNode ? targetNode->displayName() : QString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeProjectPlugin::extensionsInitialized()
|
void extensionsInitialized() final
|
||||||
{
|
{
|
||||||
// Delay the restoration to allow the devices to load first.
|
// Delay the restoration to allow the devices to load first.
|
||||||
QTimer::singleShot(0, this, [] { CMakeToolManager::restoreCMakeTools(); });
|
QTimer::singleShot(0, this, [] { CMakeToolManager::restoreCMakeTools(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeProjectPlugin::updateContextActions(Node *node)
|
void updateContextActions(ProjectExplorer::Node *node)
|
||||||
{
|
{
|
||||||
auto targetNode = dynamic_cast<const CMakeTargetNode *>(node);
|
auto targetNode = dynamic_cast<const CMakeTargetNode *>(node);
|
||||||
const QString targetDisplayName = targetNode ? targetNode->displayName() : QString();
|
const QString targetDisplayName = targetNode ? targetNode->displayName() : QString();
|
||||||
|
|
||||||
// Build Target:
|
// Build Target:
|
||||||
d->buildTargetContextAction.setParameter(targetDisplayName);
|
d->buildTargetContextAction.setParameter(targetDisplayName);
|
||||||
d->buildTargetContextAction.setEnabled(targetNode);
|
d->buildTargetContextAction.setEnabled(targetNode);
|
||||||
d->buildTargetContextAction.setVisible(targetNode);
|
d->buildTargetContextAction.setVisible(targetNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CMakeProjectPluginPrivate *d = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
} // CMakeProjectManager::Internal
|
} // CMakeProjectManager::Internal
|
||||||
|
|
||||||
|
#include "cmakeprojectplugin.moc"
|
||||||
|
@@ -1,44 +0,0 @@
|
|||||||
// Copyright (C) 2016 The Qt Company Ltd.
|
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
|
||||||
|
|
||||||
namespace ProjectExplorer { class Node; }
|
|
||||||
|
|
||||||
namespace CMakeProjectManager::Internal {
|
|
||||||
|
|
||||||
class CMakeProjectPlugin final : public ExtensionSystem::IPlugin
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CMakeProjectManager.json")
|
|
||||||
|
|
||||||
public:
|
|
||||||
~CMakeProjectPlugin();
|
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
|
||||||
private slots:
|
|
||||||
void testCMakeParser_data();
|
|
||||||
void testCMakeParser();
|
|
||||||
|
|
||||||
void testCMakeSplitValue_data();
|
|
||||||
void testCMakeSplitValue();
|
|
||||||
|
|
||||||
void testCMakeProjectImporterQt_data();
|
|
||||||
void testCMakeProjectImporterQt();
|
|
||||||
|
|
||||||
void testCMakeProjectImporterToolchain_data();
|
|
||||||
void testCMakeProjectImporterToolchain();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
|
||||||
void initialize() final;
|
|
||||||
void extensionsInitialized() final;
|
|
||||||
|
|
||||||
void updateContextActions(ProjectExplorer::Node *node);
|
|
||||||
|
|
||||||
class CMakeProjectPluginPrivate *d = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // CMakeProjectManager::Internal
|
|
Reference in New Issue
Block a user