aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2018-01-26 12:26:43 +0100
committerhjk <[email protected]>2018-01-29 06:57:45 +0000
commit2052d6fc03978a789427f0a0e76c516e77c2f43c (patch)
tree21cb4cc0ecafaaaa26210ecb8eab268f1dc01833 /src/plugins/debugger/debuggerplugin.cpp
parent5250959bd944082a8bc44edec1fa20fb3dec533a (diff)
Debugger: Remove use of IPlugin::{add,remove}Object
The functions are about to be removed. After cf7f898 the mode does not have to be in the global pool at all, the plugin needs to stay there as it is used for soft dependencies, but use direct insert/removal now. Change-Id: I6497c3ea9fb68fdfa488e8c8700e31d91e36858f Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 8e46a9735e3..9b8b224d67b 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -84,6 +84,8 @@
#include <coreplugin/outputpane.h>
#include <coreplugin/rightpane.h>
+#include <extensionsystem/pluginmanager.h>
+
#include <cppeditor/cppeditorconstants.h>
#include <qmljseditor/qmljseditorconstants.h>
#include <cpptools/cppmodelmanager.h>
@@ -1725,9 +1727,6 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_plugin->addAutoReleasedObject(new DebugModeContext(m_modeWindow));
- m_plugin->addObject(m_mode);
-
-
connect(SessionManager::instance(), &SessionManager::startupProjectChanged,
this, &DebuggerPluginPrivate::updateUiForProject);
@@ -3100,13 +3099,6 @@ void DebuggerPluginPrivate::doShutdown()
delete m_mainWindow;
m_mainWindow = 0;
- // removeObject leads to aboutToRemoveObject, which leads to
- // ModeManager::aboutToRemove, which leads to the mode manager
- // removing the mode's widget from the stackwidget
- // (currently by index, but possibly the stackwidget resets the
- // parent and stuff on the widget)
- m_plugin->removeObject(m_mode);
-
delete m_modeWindow;
m_modeWindow = 0;
@@ -3254,7 +3246,9 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
{
dd = new DebuggerPluginPrivate(this);
- addObject(this);
+ // Needed for call from AppOutputPane::attachToRunControl() and GammarayIntegration.
+ ExtensionSystem::PluginManager::addObject(this);
+
// Menu groups
ActionContainer *mstart = ActionManager::actionContainer(PE::M_DEBUG_STARTDEBUGGING);
mstart->appendGroup(Constants::G_GENERAL);
@@ -3278,7 +3272,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown()
{
- removeObject(this);
+ ExtensionSystem::PluginManager::removeObject(this);
dd->aboutToShutdown();
return AsynchronousShutdown;
}