diff options
author | hjk <[email protected]> | 2018-02-02 10:08:21 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2018-02-06 11:58:15 +0000 |
commit | 713b8636ea740502597b79b1a74382d1b3a70ab6 (patch) | |
tree | a1ece14ba7f98d1fa2ce01e4880c707dc5a74082 /src/plugins/cvs/cvsplugin.cpp | |
parent | e7792f8f50b21889f727884ab8b94cb87f38169e (diff) |
Vcs/Text search: Remove a few addAutoReleaseObject uses
Using a QObject parent suffices here.
Change-Id: I4dc5448511d55bf14fbd8f810e91336a49e94094
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 4341625c93c..3dbc5a8a598 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -204,10 +204,10 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_client = new CvsClient; - addAutoReleasedObject(new SettingsPage(versionControl())); + new SettingsPage(versionControl(), this); - addAutoReleasedObject(new VcsSubmitEditorFactory(&submitParameters, - []() { return new CvsSubmitEditor(&submitParameters); })); + new VcsSubmitEditorFactory(&submitParameters, + []() { return new CvsSubmitEditor(&submitParameters); }, this); const auto describeFunc = [this](const QString &source, const QString &changeNr) { QString errorMessage; @@ -217,11 +217,10 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]); const auto widgetCreator = []() { return new CvsEditorWidget; }; for (int i = 0; i < editorCount; i++) - addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc)); + new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc, this); const QString prefix = QLatin1String("cvs"); - m_commandLocator = new CommandLocator("CVS", prefix, prefix); - addAutoReleasedObject(m_commandLocator); + m_commandLocator = new CommandLocator("CVS", prefix, prefix, this); // Register actions ActionContainer *toolsContainer = ActionManager::actionContainer(M_TOOLS); |