aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster/cpasterplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-07 11:48:18 +0100
committerhjk <hjk@qt.io>2018-02-07 14:23:53 +0000
commitc9ceed697ff288c2c0abcddc9f02e6958ea9d5cd (patch)
tree3469e342e2ebb079010aeefbdc54e0d54cb2dea7 /src/plugins/cpaster/cpasterplugin.cpp
parente48d8afedd46e631ca96e7f02457ee9591566053 (diff)
CodePaster: Avoid use of global object pool
Change-Id: Ib81694d9dd3e8d040adc9ca12e9296e5cceb8208 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpaster/cpasterplugin.cpp')
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp
index 713ebbd173..ef3d4cae5a 100644
--- a/src/plugins/cpaster/cpasterplugin.cpp
+++ b/src/plugins/cpaster/cpasterplugin.cpp
@@ -116,8 +116,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
// Create the settings Page
m_settings->fromSettings(ICore::settings());
- SettingsPage *settingsPage = new SettingsPage(m_settings);
- addAutoReleasedObject(settingsPage);
+ SettingsPage *settingsPage = new SettingsPage(m_settings, this);
// Create the protocols and append them to the Settings
Protocol *protos[] = {new PasteBinDotComProtocol,
@@ -130,8 +129,6 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(protos[i], &Protocol::pasteDone, this, &CodepasterPlugin::finishPost);
connect(protos[i], &Protocol::fetchDone, this, &CodepasterPlugin::finishFetch);
settingsPage->addProtocol(protos[i]->name());
- if (protos[i]->hasSettings())
- addAutoReleasedObject(protos[i]->settingsPage());
m_protocols.append(protos[i]);
}
@@ -167,7 +164,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *errorMe
connect(m_fetchUrlAction, &QAction::triggered, this, &CodepasterPlugin::fetchUrl);
cpContainer->addAction(command);
- addAutoReleasedObject(new CodePasterServiceImpl);
+ new CodePasterServiceImpl(this);
return true;
}