diff options
| author | Petar Perisin <petar.perisin@gmail.com> | 2013-05-29 22:01:10 +0200 |
|---|---|---|
| committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-05-30 10:21:36 +0200 |
| commit | 2b903b46d37dc54e39b43faffffc60a33a2b9974 (patch) | |
| tree | 9610f088942b9dcdbda71e781a9b96c498862ab3 /src/plugins/git/gitplugin.cpp | |
| parent | 8762dd2ea94e4a2f371b9f1667d8b14352264e6b (diff) | |
| download | qt-creator-2b903b46d37dc54e39b43faffffc60a33a2b9974.tar.gz | |
Git - added dummy locator actions
for Merge, Rebase, Show, Cherry Pick, Revert and Checkout.
Task-number: QTCREATORBUG-9405
Change-Id: I9a10d93382248ca86fe566bf1dccf4d390601aaf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
| -rw-r--r-- | src/plugins/git/gitplugin.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 1eb1ec4215..665c332b21 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -233,7 +233,8 @@ ActionCommandPair { QAction *action = new QAction(text, this); Core::Command *command = Core::ActionManager::registerAction(action, id, context); - ac->addAction(command); + if (ac) + ac->addAction(command); m_repositoryActions.push_back(action); if (addToLocator) m_commandLocator->appendCommand(command); @@ -439,7 +440,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) globalcontext, false, SLOT(resetRepository())); createRepositoryAction(localRepositoryMenu, - tr("Interactive Rebase..."), Core::Id("Git.Rebase"), + tr("Interactive Rebase..."), Core::Id("Git.InteractiveRebase"), globalcontext, true, SLOT(startRebase())); createRepositoryAction(localRepositoryMenu, @@ -591,6 +592,29 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) // -------------- + /* Actions only in locator */ + createRepositoryAction(0, tr("Show..."), Core::Id("Git.Show"), + globalcontext, true, SLOT(startChangeRelatedAction())); + + createRepositoryAction(0, tr("Revert..."), Core::Id("Git.Revert"), + globalcontext, true, SLOT(startChangeRelatedAction())); + + createRepositoryAction(0, tr("Cherry Pick..."), Core::Id("Git.CherryPick"), + globalcontext, true, SLOT(startChangeRelatedAction())); + + createRepositoryAction(0, tr("Checkout..."), Core::Id("Git.Checkout"), + globalcontext, true, SLOT(startChangeRelatedAction())); + + createRepositoryAction(0, tr("Rebase..."), Core::Id("Git.Rebase"), + globalcontext, true, SLOT(branchList())); + + createRepositoryAction(0, tr("Merge..."), Core::Id("Git.Merge"), + globalcontext, true, SLOT(branchList())); + + /* \Actions only in locator */ + + // -------------- + /* "Git Tools" menu */ Core::ActionContainer *gitToolsMenu = Core::ActionManager::createMenu(Core::Id("Git.GitToolsMenu")); gitToolsMenu->menu()->setTitle(tr("Git &Tools")); |
