forked from qt-creator/qt-creator
CompilationDatabase: Use new plugin test setup
Change-Id: Ic45c59a2adb3287e2cd92b70836bc309f5e1a8e0 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace CompilationDatabaseProjectManager {
|
||||
namespace Internal {
|
||||
namespace CompilationDatabaseProjectManager::Internal {
|
||||
|
||||
const char CHANGEROOTDIR[] = "CompilationDatabaseProjectManager.ChangeRootDirectory";
|
||||
const char COMPILE_COMMANDS_JSON[] = "compile_commands.json";
|
||||
@@ -78,16 +77,10 @@ void CompilationDatabaseProjectManagerPlugin::initialize()
|
||||
|
||||
connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
this, onProjectChanged);
|
||||
}
|
||||
|
||||
QVector<QObject *> CompilationDatabaseProjectManagerPlugin::createTestObjects() const
|
||||
{
|
||||
return {
|
||||
#ifdef WITH_TESTS
|
||||
new CompilationDatabaseTests
|
||||
addTest<CompilationDatabaseTests>();
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CompilationDatabaseProjectManager
|
||||
} // CompilationDatabaseProjectManager::Internal
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace CompilationDatabaseProjectManager {
|
||||
namespace Internal {
|
||||
namespace CompilationDatabaseProjectManager::Internal {
|
||||
|
||||
class CompilationDatabaseProjectManagerPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
@@ -16,10 +15,8 @@ class CompilationDatabaseProjectManagerPlugin final : public ExtensionSystem::IP
|
||||
~CompilationDatabaseProjectManagerPlugin();
|
||||
|
||||
void initialize() final;
|
||||
QVector<QObject *> createTestObjects() const final;
|
||||
|
||||
class CompilationDatabaseProjectManagerPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CompilationDatabaseProjectManager
|
||||
} // CompilationDatabaseProjectManager::Internal
|
||||
|
||||
Reference in New Issue
Block a user