aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/compilationdatabaseprojectmanager
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-02-09 10:39:40 +0100
committerhjk <hjk@qt.io>2023-02-15 12:32:21 +0000
commitb2815c39b1508c2b50d382d76416725c4662dc5b (patch)
tree4c80fa9a4d3b6ce2beb99996deb02fc6bf6ab1fe /src/plugins/compilationdatabaseprojectmanager
parente8802d92e39f1af4ab887a454a7371005ad7db6e (diff)
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>
Diffstat (limited to 'src/plugins/compilationdatabaseprojectmanager')
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.cpp13
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.h7
2 files changed, 5 insertions, 15 deletions
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.cpp
index 5cb9c75d8f2..fc1da70ca75 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.cpp
@@ -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
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.h b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.h
index 251138ba690..24642bfce8d 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.h
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseprojectmanagerplugin.h
@@ -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