summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/outputwindow.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-05-26 14:48:38 +0200
committerEike Ziller <eike.ziller@qt.io>2020-05-27 08:42:00 +0000
commite5bb7d1ffebbba90aa2c1098c1ff67694dd0fdaf (patch)
tree36e0de1bc7374a9fa77bec011845783f5e57036d /src/plugins/coreplugin/outputwindow.cpp
parent7b5481f75c968ba1eb74240609b0d5d687a30e68 (diff)
downloadqt-creator-e5bb7d1ffebbba90aa2c1098c1ff67694dd0fdaf.tar.gz
Remove unnecessary removeContextObject calls
They are removed on deletion now. Change-Id: I08461ea4938e24ab450df013a0f8f820032381da Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/outputwindow.cpp')
-rw-r--r--src/plugins/coreplugin/outputwindow.cpp15
1 files changed, 4 insertions, 11 deletions
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<QPair<QString, OutputFormat>> 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);