summaryrefslogtreecommitdiff
path: root/src/plugins/bazaar
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-11-16 12:05:34 +0200
committerOrgad Shaneh <orgads@gmail.com>2014-11-17 10:57:07 +0100
commita4b4728267ce81880d0fbde6b8c559e3a762d091 (patch)
treecac57389e4f61fa81f6436cb1e6f3aa31f2f39fe /src/plugins/bazaar
parent17c92cdeef9e76ae4f5ff2643b98aa2c8d81f071 (diff)
downloadqt-creator-a4b4728267ce81880d0fbde6b8c559e3a762d091.tar.gz
VCS: Rework disabling of ambiguous actions
Task-number: QTCREATORBUG-13364 Change-Id: Ib9dc98964983f1a2808a89d90969089a09d2b55e Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/bazaar')
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp10
-rw-r--r--src/plugins/bazaar/bazaarplugin.h2
-rw-r--r--src/plugins/bazaar/constants.h1
3 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 95d624247c..f6d537b3e6 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -162,8 +162,10 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag
Q_UNUSED(arguments);
Q_UNUSED(errorMessage);
+ Context context(Constants::BAZAAR_CONTEXT);
+
m_client = new BazaarClient(&m_bazaarSettings);
- initializeVcs(new BazaarControl(m_client));
+ initializeVcs(new BazaarControl(m_client), context);
addAutoReleasedObject(new OptionsPage);
m_bazaarSettings.readSettings(ICore::settings());
@@ -193,7 +195,7 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag
m_commandLocator = new CommandLocator("Bazaar", prefix, prefix);
addAutoReleasedObject(m_commandLocator);
- createMenu();
+ createMenu(context);
createSubmitEditorActions();
@@ -226,10 +228,8 @@ void BazaarPlugin::setSettings(const BazaarSettings &settings)
}
}
-void BazaarPlugin::createMenu()
+void BazaarPlugin::createMenu(const Context &context)
{
- Context context(Core::Constants::C_GLOBAL);
-
// Create menu item for Bazaar
m_bazaarContainer = ActionManager::createMenu("Bazaar.BazaarMenu");
QMenu *menu = m_bazaarContainer->menu();
diff --git a/src/plugins/bazaar/bazaarplugin.h b/src/plugins/bazaar/bazaarplugin.h
index 906842119f..133a5cdc25 100644
--- a/src/plugins/bazaar/bazaarplugin.h
+++ b/src/plugins/bazaar/bazaarplugin.h
@@ -109,7 +109,7 @@ protected:
private:
// Functions
- void createMenu();
+ void createMenu(const Core::Context &context);
void createSubmitEditorActions();
void createFileActions(const Core::Context &context);
void createDirectoryActions(const Core::Context &context);
diff --git a/src/plugins/bazaar/constants.h b/src/plugins/bazaar/constants.h
index f4d5c6918b..38ec34e916 100644
--- a/src/plugins/bazaar/constants.h
+++ b/src/plugins/bazaar/constants.h
@@ -36,6 +36,7 @@ namespace Constants {
const char BAZAAR[] = "bazaar";
const char BAZAARREPO[] = ".bzr";
const char BAZAARDEFAULT[] = "bzr";
+const char BAZAAR_CONTEXT[] = "Bazaar Context";
// Changeset identifiers
const char CHANGESET_ID[] = "^("