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:
hjk
2023-02-09 10:39:40 +01:00
parent e8802d92e3
commit b2815c39b1
2 changed files with 5 additions and 15 deletions

View File

@@ -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

View File

@@ -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