summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-01-22 13:51:54 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-01-22 14:18:01 +0100
commitd2da1a94ffd13d36f5129be1d0993ad219bbf0cc (patch)
tree2341334543cb70eab58b56de9855f8e72051d931
parenta6e1e388586b6064a83a253662893df42c2a9217 (diff)
downloadqt-creator-d2da1a94ffd13d36f5129be1d0993ad219bbf0cc.tar.gz
Bazaar: Sprinkle with auto
Change-Id: Ie87de7eeeba6988870c8c35eab67be576f4e60a5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp20
-rw-r--r--src/plugins/bazaar/clonewizard.cpp8
-rw-r--r--src/plugins/bazaar/uncommitdialog.cpp2
3 files changed, 11 insertions, 19 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 2decaa7009..aa21b41e2b 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -250,10 +250,8 @@ void BazaarPlugin::createMenu(const Context &context)
void BazaarPlugin::createFileActions(const Context &context)
{
- Core::Command *command;
-
m_annotateFile = new ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
- command = ActionManager::registerAction(m_annotateFile, ANNOTATE, context);
+ Core::Command *command = ActionManager::registerAction(m_annotateFile, ANNOTATE, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_annotateFile, SIGNAL(triggered()), this, SLOT(annotateCurrentFile()));
m_bazaarContainer->addAction(command);
@@ -360,12 +358,9 @@ void BazaarPlugin::statusCurrentFile()
void BazaarPlugin::createDirectoryActions(const Context &context)
{
- QAction *action;
- Core::Command *command;
-
- action = new QAction(tr("Diff"), this);
+ auto action = new QAction(tr("Diff"), this);
m_repositoryActionList.append(action);
- command = ActionManager::registerAction(action, DIFFMULTI, context);
+ Core::Command *command = ActionManager::registerAction(action, DIFFMULTI, context);
connect(action, SIGNAL(triggered()), this, SLOT(diffRepository()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
@@ -431,12 +426,9 @@ void BazaarPlugin::statusMulti()
void BazaarPlugin::createRepositoryActions(const Context &context)
{
- QAction *action = 0;
- Core::Command *command = 0;
-
- action = new QAction(tr("Pull..."), this);
+ auto action = new QAction(tr("Pull..."), this);
m_repositoryActionList.append(action);
- command = ActionManager::registerAction(action, PULL, context);
+ Core::Command *command = ActionManager::registerAction(action, PULL, context);
connect(action, SIGNAL(triggered()), this, SLOT(pull()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
@@ -470,7 +462,7 @@ void BazaarPlugin::createRepositoryActions(const Context &context)
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
- QAction *createRepositoryAction = new QAction(tr("Create Repository..."), this);
+ auto createRepositoryAction = new QAction(tr("Create Repository..."), this);
command = ActionManager::registerAction(createRepositoryAction, CREATE_REPOSITORY, context);
connect(createRepositoryAction, SIGNAL(triggered()), this, SLOT(createRepository()));
m_bazaarContainer->addAction(command);
diff --git a/src/plugins/bazaar/clonewizard.cpp b/src/plugins/bazaar/clonewizard.cpp
index 9a24c8bb6a..05ebe93646 100644
--- a/src/plugins/bazaar/clonewizard.cpp
+++ b/src/plugins/bazaar/clonewizard.cpp
@@ -59,11 +59,11 @@ CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
const Core::IVersionControl *vc = BazaarPlugin::instance()->versionControl();
if (!vc->isConfigured()) {
- VcsConfigurationPage *configPage = new VcsConfigurationPage;
+ auto configPage = new VcsConfigurationPage;
configPage->setVersionControl(vc);
addPage(configPage);
}
- CloneWizardPage *page = new CloneWizardPage;
+ auto page = new CloneWizardPage;
page->setPath(path.toString());
addPage(page);
}
@@ -105,8 +105,8 @@ VcsCommand *CloneWizard::createCommand(Utils::FileName *checkoutDir)
args << client->vcsCommandString(BazaarClient::CloneCommand)
<< extraOptions << cwp->repository() << cwp->directory();
- VcsCommand *command = new VcsCommand(settings.binaryPath(), cwp->path(),
- client->processEnvironment());
+ auto command = new VcsCommand(settings.binaryPath(), cwp->path(),
+ client->processEnvironment());
command->addJob(args, -1);
return command;
}
diff --git a/src/plugins/bazaar/uncommitdialog.cpp b/src/plugins/bazaar/uncommitdialog.cpp
index 04d78fefa4..9210de0f04 100644
--- a/src/plugins/bazaar/uncommitdialog.cpp
+++ b/src/plugins/bazaar/uncommitdialog.cpp
@@ -45,7 +45,7 @@ UnCommitDialog::UnCommitDialog(QWidget *parent)
{
m_ui->setupUi(this);
- QPushButton* dryRunBtn = new QPushButton(tr("Dry Run"));
+ auto dryRunBtn = new QPushButton(tr("Dry Run"));
dryRunBtn->setToolTip(tr("Test the outcome of removing the last committed revision, without actually removing anything."));
m_ui->buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole);
connect(dryRunBtn, SIGNAL(clicked()), this, SLOT(dryRun()));