diff options
author | hjk <[email protected]> | 2023-02-09 10:14:59 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2023-02-14 13:29:30 +0000 |
commit | b4f665f8acc73c11063cc2cb6c829428fc1d1748 (patch) | |
tree | 69beb6a511022670d88a63b8303a2c6e73d22d65 /src/plugins/debugger/debuggerplugin.cpp | |
parent | f3b58359fd534a55eb17b336cd5ba7ea225d2b57 (diff) |
Debugger: Use new plugin test object setup
Change-Id: Ic97dfd9aa22c4c8e41f81478983fb79760a76807
Reviewed-by: Christian Stenger <[email protected]>
Reviewed-by: <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index cec06c16b0c..8ab67c0bc54 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2125,17 +2125,6 @@ DebuggerPlugin::~DebuggerPlugin() m_instance = nullptr; } -bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMessage) -{ - Q_UNUSED(errorMessage) - - // Needed for call from AppOutputPane::attachToRunControl() and GammarayIntegration. - ExtensionSystem::PluginManager::addObject(this); - - dd = new DebuggerPluginPrivate(arguments); - return true; -} - IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown() { ExtensionSystem::PluginManager::removeObject(this); @@ -2489,19 +2478,23 @@ void DebuggerUnitTests::testDebuggerMatching() QCOMPARE(expectedLevel, level); } -QVector<QObject *> DebuggerPlugin::createTestObjects() const +#endif // ifdef WITH_TESTS + +bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMessage) { - return {new DebuggerUnitTests}; -} + Q_UNUSED(errorMessage) -#else // ^-- if WITH_TESTS else --v + // Needed for call from AppOutputPane::attachToRunControl() and GammarayIntegration. + ExtensionSystem::PluginManager::addObject(this); -QVector<QObject *> DebuggerPlugin::createTestObjects() const -{ - return {}; -} + dd = new DebuggerPluginPrivate(arguments); + +#ifdef WITH_TESTS + addTest<DebuggerUnitTests>(); +#endif -#endif // if WITH_TESTS + return true; +} } // Internal } // Debugger |