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);
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -54,7 +54,7 @@ class SettingsPage : public VcsBase::VcsClientOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsPage(Core::IVersionControl *control);
|
||||
SettingsPage(Core::IVersionControl *control, QObject *parent);
|
||||
};
|
||||
|
||||
} // namespace Cvs
|
||||
|
||||
Reference in New Issue
Block a user