forked from qt-creator/qt-creator
Mercurial: Sprinkle with auto
Change-Id: Id2a4adb5c4759e64affed8c5988feb58389ec1ea Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -54,11 +54,11 @@ CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
|
||||
|
||||
const Core::IVersionControl *vc = MercurialPlugin::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);
|
||||
}
|
||||
@@ -82,8 +82,8 @@ VcsCommand *CloneWizard::createCommand(Utils::FileName *checkoutDir)
|
||||
QStringList args;
|
||||
args << QLatin1String("clone") << cwp->repository() << directory;
|
||||
*checkoutDir = Utils::FileName::fromString(path + QLatin1Char('/') + directory);
|
||||
VcsCommand *command = new VcsCommand(settings.binaryPath(), path,
|
||||
QProcessEnvironment::systemEnvironment());
|
||||
auto command = new VcsCommand(settings.binaryPath(), path,
|
||||
QProcessEnvironment::systemEnvironment());
|
||||
command->addJob(args, -1);
|
||||
return command;
|
||||
}
|
||||
|
@@ -320,12 +320,9 @@ void MercurialPlugin::statusCurrentFile()
|
||||
|
||||
void MercurialPlugin::createDirectoryActions(const Core::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 = Core::ActionManager::registerAction(action, Core::Id(Constants::DIFFMULTI), context);
|
||||
Core::Command *command = Core::ActionManager::registerAction(action, Core::Id(Constants::DIFFMULTI), context);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(diffRepository()));
|
||||
m_mercurialContainer->addAction(command);
|
||||
m_commandLocator->appendCommand(command);
|
||||
@@ -387,7 +384,7 @@ void MercurialPlugin::statusMulti()
|
||||
|
||||
void MercurialPlugin::createRepositoryActions(const Core::Context &context)
|
||||
{
|
||||
QAction *action = new QAction(tr("Pull..."), this);
|
||||
auto action = new QAction(tr("Pull..."), this);
|
||||
m_repositoryActionList.append(action);
|
||||
Core::Command *command = Core::ActionManager::registerAction(action, Core::Id(Constants::PULL), context);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(pull()));
|
||||
@@ -517,10 +514,9 @@ void MercurialPlugin::outgoing()
|
||||
void MercurialPlugin::createSubmitEditorActions()
|
||||
{
|
||||
Core::Context context(Constants::COMMIT_ID);
|
||||
Core::Command *command;
|
||||
|
||||
editorCommit = new QAction(VcsBaseSubmitEditor::submitIcon(), tr("Commit"), this);
|
||||
command = Core::ActionManager::registerAction(editorCommit, Core::Id(Constants::COMMIT), context);
|
||||
Core::Command *command = Core::ActionManager::registerAction(editorCommit, Core::Id(Constants::COMMIT), context);
|
||||
command->setAttribute(Core::Command::CA_UpdateText);
|
||||
connect(editorCommit, SIGNAL(triggered()), this, SLOT(commitFromEditor()));
|
||||
|
||||
@@ -649,7 +645,7 @@ void MercurialPlugin::createRepositoryManagementActions(const Core::Context &con
|
||||
//TODO create menu for these options
|
||||
Q_UNUSED(context);
|
||||
return;
|
||||
// QAction *action = new QAction(tr("Branch"), this);
|
||||
// auto action = new QAction(tr("Branch"), this);
|
||||
// actionList.append(action);
|
||||
// Core::Command *command = Core::ActionManager::registerAction(action, Constants::BRANCH, context);
|
||||
// // connect(action, SIGNAL(triggered()), this, SLOT(branch()));
|
||||
|
Reference in New Issue
Block a user