summaryrefslogtreecommitdiff
path: root/src/plugins/git/gitplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-02-02 10:08:21 +0100
committerhjk <hjk@qt.io>2018-02-06 11:58:15 +0000
commit713b8636ea740502597b79b1a74382d1b3a70ab6 (patch)
treea1ece14ba7f98d1fa2ce01e4880c707dc5a74082 /src/plugins/git/gitplugin.cpp
parente7792f8f50b21889f727884ab8b94cb87f38169e (diff)
downloadqt-creator-713b8636ea740502597b79b1a74382d1b3a70ab6.tar.gz
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/git/gitplugin.cpp')
-rw-r--r--src/plugins/git/gitplugin.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index 9979fc4922..ddab8cd2fe 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -299,12 +299,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
auto vc = initializeVcs<GitVersionControl>(context, m_gitClient);
// Create the settings Page
- auto settingsPage = new SettingsPage(vc);
- addAutoReleasedObject(settingsPage);
+ auto settingsPage = new SettingsPage(vc, this);
connect(settingsPage, &SettingsPage::settingsChanged,
this, &GitPlugin::updateRepositoryBrowserAction);
- addAutoReleasedObject(new GitGrep);
+ new GitGrep(this);
const auto describeFunc = [this](const QString &source, const QString &id) {
m_gitClient->show(source, id);
@@ -312,14 +311,13 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]);
const auto widgetCreator = []() { return new GitEditorWidget; };
for (int i = 0; i < editorCount; i++)
- addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc));
+ new VcsEditorFactory(editorParameters + i, widgetCreator, describeFunc, this);
- addAutoReleasedObject(new VcsSubmitEditorFactory(&submitParameters,
- []() { return new GitSubmitEditor(&submitParameters); }));
+ new VcsSubmitEditorFactory(&submitParameters,
+ []() { return new GitSubmitEditor(&submitParameters); }, this);
const QString prefix = "git";
- m_commandLocator = new CommandLocator("Git", prefix, prefix);
- addAutoReleasedObject(m_commandLocator);
+ m_commandLocator = new CommandLocator("Git", prefix, prefix, this);
//register actions
ActionContainer *toolsContainer = ActionManager::actionContainer(Core::Constants::M_TOOLS);