forked from qt-creator/qt-creator
Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case. Similar for ActionContainer::addSeparator(). Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -161,15 +161,13 @@ AppOutputPane::AppOutputPane() :
|
||||
this, SLOT(reRunRunControl()));
|
||||
|
||||
// Stop
|
||||
Core::Context globalcontext(Core::Constants::C_GLOBAL);
|
||||
|
||||
QIcon stopIcon = QIcon(QLatin1String(Constants::ICON_STOP));
|
||||
stopIcon.addFile(QLatin1String(Constants::ICON_STOP_SMALL));
|
||||
m_stopAction->setIcon(stopIcon);
|
||||
m_stopAction->setToolTip(tr("Stop"));
|
||||
m_stopAction->setEnabled(false);
|
||||
|
||||
Core::Command *cmd = Core::ActionManager::registerAction(m_stopAction, Constants::STOP, globalcontext);
|
||||
Core::Command *cmd = Core::ActionManager::registerAction(m_stopAction, Constants::STOP);
|
||||
|
||||
m_stopButton->setDefaultAction(cmd->action());
|
||||
m_stopButton->setAutoRaise(true);
|
||||
|
||||
Reference in New Issue
Block a user