diff options
author | hjk <hjk@qt.io> | 2018-02-02 10:08:21 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-02-06 11:58:15 +0000 |
commit | 713b8636ea740502597b79b1a74382d1b3a70ab6 (patch) | |
tree | a1ece14ba7f98d1fa2ce01e4880c707dc5a74082 /src/plugins/cvs | |
parent | e7792f8f50b21889f727884ab8b94cb87f38169e (diff) |
Vcs/Text search: Remove a few addAutoReleaseObject uses
Using a QObject parent suffices here.
Change-Id: I4dc5448511d55bf14fbd8f810e91336a49e94094
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 11 | ||||
-rw-r--r-- | src/plugins/cvs/settingspage.cpp | 4 | ||||
-rw-r--r-- | src/plugins/cvs/settingspage.h | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 4341625c93..3dbc5a8a59 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); diff --git a/src/plugins/cvs/settingspage.cpp b/src/plugins/cvs/settingspage.cpp index 385ad58699..cf47b8a8b8 100644 --- a/src/plugins/cvs/settingspage.cpp +++ b/src/plugins/cvs/settingspage.cpp @@ -72,8 +72,8 @@ void SettingsPageWidget::setSettings(const VcsBaseClientSettings &s) m_ui.describeByCommitIdCheckBox->setChecked(s.boolValue(CvsSettings::describeByCommitIdKey)); } -SettingsPage::SettingsPage(Core::IVersionControl *control) : - VcsClientOptionsPage(control, CvsPlugin::instance()->client()) +SettingsPage::SettingsPage(Core::IVersionControl *control, QObject *parent) : + VcsClientOptionsPage(control, CvsPlugin::instance()->client(), parent) { setId(VcsBase::Constants::VCS_ID_CVS); setDisplayName(tr("CVS")); diff --git a/src/plugins/cvs/settingspage.h b/src/plugins/cvs/settingspage.h index cf1c08ee40..a36fdd1f92 100644 --- a/src/plugins/cvs/settingspage.h +++ b/src/plugins/cvs/settingspage.h @@ -54,7 +54,7 @@ class SettingsPage : public VcsBase::VcsClientOptionsPage Q_OBJECT public: - SettingsPage(Core::IVersionControl *control); + SettingsPage(Core::IVersionControl *control, QObject *parent); }; } // namespace Cvs |