summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/coreplugin/modemanager.cpp8
-rw-r--r--src/plugins/coreplugin/modemanager.h4
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp2
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp
index f10b50a3a7..6b3f0c2e60 100644
--- a/src/plugins/coreplugin/modemanager.cpp
+++ b/src/plugins/coreplugin/modemanager.cpp
@@ -71,7 +71,7 @@ struct ModeManagerPrivate
Internal::MainWindow *m_mainWindow;
Internal::FancyTabWidget *m_modeStack;
Internal::FancyActionBar *m_actionBar;
- QMap<Command*, int> m_actions;
+ QMap<QAction*, int> m_actions;
QVector<IMode*> m_modes;
QVector<Command*> m_modeShortcuts;
QSignalMapper *m_signalMapper;
@@ -269,9 +269,9 @@ void ModeManager::aboutToRemoveObject(QObject *obj)
d->m_mainWindow->removeContextObject(mode);
}
-void ModeManager::addAction(Command *command, int priority)
+void ModeManager::addAction(QAction *action, int priority)
{
- d->m_actions.insert(command, priority);
+ d->m_actions.insert(action, priority);
// Count the number of commands with a higher priority
int index = 0;
@@ -280,7 +280,7 @@ void ModeManager::addAction(Command *command, int priority)
++index;
}
- d->m_actionBar->insertAction(index, command->action());
+ d->m_actionBar->insertAction(index, action);
}
void ModeManager::addProjectSelector(QAction *action)
diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h
index a0d5ef3508..dd064190e4 100644
--- a/src/plugins/coreplugin/modemanager.h
+++ b/src/plugins/coreplugin/modemanager.h
@@ -43,8 +43,8 @@ QT_END_NAMESPACE
namespace Core {
-class Command;
class IMode;
+
namespace Internal {
class MainWindow;
class FancyTabWidget;
@@ -66,7 +66,7 @@ public:
IMode* currentMode() const;
IMode* mode(const QString &id) const;
- void addAction(Command *command, int priority);
+ void addAction(QAction *action, int priority);
void addProjectSelector(QAction *action);
void addWidget(QWidget *widget);
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 366400f84b..e031dc5d3e 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -2836,7 +2836,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
cmd->setDefaultText(tr("Start Debugging"));
cmd->setDefaultKeySequence(QKeySequence(Constants::DEBUG_KEY));
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
- Core::ICore::instance()->modeManager()->addAction(cmd, Constants::P_ACTION_DEBUG);
+ Core::ICore::instance()->modeManager()->addAction(cmd->action(), Constants::P_ACTION_DEBUG);
cmd = am->registerAction(m_actions.continueAction,
Constants::DEBUG, m_continuableContext);
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 3989297c8d..2b451264d3 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -582,7 +582,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mbuild->addAction(cmd, Constants::G_BUILD_SESSION);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
// Add to mode bar
- modeManager->addAction(cmd, Constants::P_ACTION_BUILDSESSION);
+ modeManager->addAction(cmd->action(), Constants::P_ACTION_BUILDSESSION);
// rebuild session action
QIcon rebuildIcon(Constants::ICON_REBUILD);
@@ -705,7 +705,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+R")));
mbuild->addAction(cmd, Constants::G_BUILD_RUN);
- modeManager->addAction(cmd, Constants::P_ACTION_RUN);
+ modeManager->addAction(cmd->action(), Constants::P_ACTION_RUN);
d->m_runActionContextMenu = new QAction(runIcon, tr("Run"), this);
cmd = am->registerAction(d->m_runActionContextMenu, Constants::RUNCONTEXTMENU, projecTreeContext);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp
index fc0f8f263d..f37f9d11ee 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp
@@ -99,7 +99,7 @@ MaemoQemuManager::MaemoQemuManager(QObject *parent)
qemuCommand->setAttribute(Core::Command::CA_UpdateIcon);
Core::ModeManager *modeManager = core->modeManager();
- modeManager->addAction(qemuCommand, 1);
+ modeManager->addAction(qemuCommand->action(), 1);
// listen to qt version changes to update the start button
connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)),