forked from qt-creator/qt-creator
Vcs/Text search: Remove a few addAutoReleaseObject uses
Using a QObject parent suffices here. Change-Id: I4dc5448511d55bf14fbd8f810e91336a49e94094 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user