diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index 5144d36a79a7d1cc5ce1cd1bce5b8a80519186b3..618b9d3ca7b0546e0d8646684257e03fb39bb507 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -164,7 +164,7 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag addAutoReleasedObject(new CloneWizard); const QString prefix = QLatin1String("bzr"); - m_commandLocator = new Locator::CommandLocator(QLatin1String("Bazaar"), prefix, prefix); + m_commandLocator = new Locator::CommandLocator("Bazaar", prefix, prefix); addAutoReleasedObject(m_commandLocator); createMenu(); diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index a9adb9e0c519dcfd98e2568026e04ed4cf569a57..048d50a2347ffe47067b09ac0b822278033b4521 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -301,7 +301,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er const QString description = QLatin1String("ClearCase"); const QString prefix = QLatin1String("cc"); // register cc prefix in Locator - m_commandLocator = new Locator::CommandLocator(prefix, description, prefix); + m_commandLocator = new Locator::CommandLocator("cc", description, prefix); addAutoReleasedObject(m_commandLocator); //register actions diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 4da18516c744cd69acab15a5502b295125e673cc..d921d9efd49214f2c999797cd79926da47153053 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -249,7 +249,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage) addAutoReleasedObject(new CheckoutWizard); const QString prefix = QLatin1String("cvs"); - m_commandLocator = new Locator::CommandLocator(QLatin1String("CVS"), prefix, prefix); + m_commandLocator = new Locator::CommandLocator("CVS", prefix, prefix); addAutoReleasedObject(m_commandLocator); // Register actions diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 6a4491343f1877f01d4efa6800147d209a62ba25..e97b78a4c18f86fabd36dcae89e468937b124748 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -294,9 +294,8 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) addAutoReleasedObject(new CloneWizard); addAutoReleasedObject(new Gitorious::Internal::GitoriousCloneWizard); - const QString description = QLatin1String("Git"); const QString prefix = QLatin1String("git"); - m_commandLocator = new Locator::CommandLocator(description, prefix, prefix); + m_commandLocator = new Locator::CommandLocator("Git", prefix, prefix); addAutoReleasedObject(m_commandLocator); //register actions diff --git a/src/plugins/locator/commandlocator.cpp b/src/plugins/locator/commandlocator.cpp index 04f5d606f69eb9e878528cdeed33e18ead79de75..32175900059c614a4e416321d427e34e6ecf72ff 100644 --- a/src/plugins/locator/commandlocator.cpp +++ b/src/plugins/locator/commandlocator.cpp @@ -31,7 +31,6 @@ #include <coreplugin/actionmanager/command.h> #include <coreplugin/icore.h> -#include <coreplugin/id.h> #include <utils/qtcassert.h> @@ -44,14 +43,14 @@ struct CommandLocatorPrivate QList<Core::Command *> commands; }; -CommandLocator::CommandLocator(const QString &prefix, +CommandLocator::CommandLocator(Core::Id id, const QString &displayName, const QString &shortCutString, QObject *parent) : Locator::ILocatorFilter(parent), d(new CommandLocatorPrivate) { - setId(Core::Id::fromString(prefix)); + setId(id); setDisplayName(displayName); setShortcutString(shortCutString); } diff --git a/src/plugins/locator/commandlocator.h b/src/plugins/locator/commandlocator.h index 556bdd8244b5ed34648c03ea3cdb526bcff2544a..3fd56e49b6a0d311baae97dd6506da7bd3e43827 100644 --- a/src/plugins/locator/commandlocator.h +++ b/src/plugins/locator/commandlocator.h @@ -46,10 +46,8 @@ class LOCATOR_EXPORT CommandLocator : public Locator::ILocatorFilter Q_OBJECT public: - explicit CommandLocator(const QString &prefix, - const QString &displayName, - const QString &shortCutString, - QObject *parent = 0); + CommandLocator(Core::Id id, const QString &displayName, + const QString &shortCutString, QObject *parent = 0); ~CommandLocator(); void appendCommand(Core::Command *cmd); diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index a17451c371c369e06a6863addd9d2977a21d316c..f468264484277feee972643de03027a3c3790180 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -162,7 +162,7 @@ bool MercurialPlugin::initialize(const QStringList & /* arguments */, QString * addAutoReleasedObject(new CloneWizard); const QString prefix = QLatin1String("hg"); - m_commandLocator = new Locator::CommandLocator(QLatin1String("Mercurial"), prefix, prefix); + m_commandLocator = new Locator::CommandLocator("Mercurial", prefix, prefix); addAutoReleasedObject(m_commandLocator); createMenu(); diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index af684c9f46285c079a5ae1d675b7eaab16708217..54e74a889cb1e83d998cad0d56b926bdfb0e5cc7 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -239,7 +239,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er addAutoReleasedObject(new PerforceEditorFactory(editorParameters + i, this, describeSlot)); const QString prefix = QLatin1String("p4"); - m_commandLocator = new Locator::CommandLocator(QLatin1String("Perforce"), prefix, prefix); + m_commandLocator = new Locator::CommandLocator("Perforce", prefix, prefix); addAutoReleasedObject(m_commandLocator); Core::ActionContainer *mtools = diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index ec8f7c5d6598259897f5fcf40c18713397a5c7c2..5bb6533c58ad00668d308513687c042f6e9c304a 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -269,9 +269,8 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e addAutoReleasedObject(new CheckoutWizard); - const QString description = QLatin1String("Subversion"); const QString prefix = QLatin1String("svn"); - m_commandLocator = new Locator::CommandLocator(description, prefix, prefix); + m_commandLocator = new Locator::CommandLocator("Subversion", prefix, prefix); addAutoReleasedObject(m_commandLocator); //register actions