From e5bb7d1ffebbba90aa2c1098c1ff67694dd0fdaf Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 26 May 2020 14:48:38 +0200 Subject: Remove unnecessary removeContextObject calls They are removed on deletion now. Change-Id: I08461ea4938e24ab450df013a0f8f820032381da Reviewed-by: hjk --- src/plugins/coreplugin/outputwindow.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/plugins/coreplugin/outputwindow.cpp') diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 344d117e4f..6b08863ea6 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -66,13 +66,6 @@ public: { } - ~OutputWindowPrivate() - { - ICore::removeContextObject(outputWindowContext); - delete outputWindowContext; - } - - IContext *outputWindowContext = nullptr; QString settingsKey; OutputFormatter formatter; QList> queuedOutput; @@ -116,10 +109,10 @@ OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget d->settingsKey = settingsKey; - d->outputWindowContext = new IContext; - d->outputWindowContext->setContext(context); - d->outputWindowContext->setWidget(this); - ICore::addContextObject(d->outputWindowContext); + auto outputWindowContext = new IContext(this); + outputWindowContext->setContext(context); + outputWindowContext->setWidget(this); + ICore::addContextObject(outputWindowContext); auto undoAction = new QAction(this); auto redoAction = new QAction(this); -- cgit v1.2.1