forked from qt-creator/qt-creator
Fixes: - Command --> CommandPrivate
Details: - Preparation for ICommand rename
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
#include "actioncontainer_p.h"
|
#include "actioncontainer_p.h"
|
||||||
#include "actionmanager_p.h"
|
#include "actionmanager_p.h"
|
||||||
|
|
||||||
#include "command.h"
|
#include "command_p.h"
|
||||||
#include "coreimpl.h"
|
#include "coreimpl.h"
|
||||||
|
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
@@ -171,7 +171,7 @@ void ActionContainerPrivate::addAction(ICommand *action, const QString &group)
|
|||||||
|
|
||||||
ActionManagerPrivate *am = ActionManagerPrivate::instance();
|
ActionManagerPrivate *am = ActionManagerPrivate::instance();
|
||||||
Action *a = static_cast<Action *>(action);
|
Action *a = static_cast<Action *>(action);
|
||||||
if (a->stateFlags() & Command::CS_PreLocation) {
|
if (a->stateFlags() & CommandPrivate::CS_PreLocation) {
|
||||||
QList<CommandLocation> locs = a->locations();
|
QList<CommandLocation> locs = a->locations();
|
||||||
for (int i=0; i<locs.size(); ++i) {
|
for (int i=0; i<locs.size(); ++i) {
|
||||||
if (ActionContainer *aci = am->actionContainer(locs.at(i).m_container)) {
|
if (ActionContainer *aci = am->actionContainer(locs.at(i).m_container)) {
|
||||||
@@ -179,7 +179,7 @@ void ActionContainerPrivate::addAction(ICommand *action, const QString &group)
|
|||||||
ac->addAction(action, locs.at(i).m_position, false);
|
ac->addAction(action, locs.at(i).m_position, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a->setStateFlags(a->stateFlags() | Command::CS_Initialized);
|
a->setStateFlags(a->stateFlags() | CommandPrivate::CS_Initialized);
|
||||||
} else {
|
} else {
|
||||||
UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager();
|
UniqueIDManager *idmanager = CoreImpl::instance()->uniqueIDManager();
|
||||||
int grpid = idmanager->uniqueIdentifier(Constants::G_DEFAULT_TWO);
|
int grpid = idmanager->uniqueIdentifier(Constants::G_DEFAULT_TWO);
|
||||||
@@ -239,8 +239,8 @@ bool ActionContainerPrivate::canAddAction(ICommand *action) const
|
|||||||
if (action->type() != ICommand::CT_OverridableAction)
|
if (action->type() != ICommand::CT_OverridableAction)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Command *cmd = static_cast<Command *>(action);
|
CommandPrivate *cmd = static_cast<CommandPrivate *>(action);
|
||||||
if (cmd->stateFlags() & Command::CS_Initialized)
|
if (cmd->stateFlags() & CommandPrivate::CS_Initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "actionmanager_p.h"
|
#include "actionmanager_p.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "actioncontainer_p.h"
|
#include "actioncontainer_p.h"
|
||||||
#include "command.h"
|
#include "command_p.h"
|
||||||
#include "uniqueidmanager.h"
|
#include "uniqueidmanager.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
@@ -233,7 +233,7 @@ QList<int> ActionManagerPrivate::defaultGroups() const
|
|||||||
return m_defaultGroups;
|
return m_defaultGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Command *> ActionManagerPrivate::commands() const
|
QList<CommandPrivate *> ActionManagerPrivate::commands() const
|
||||||
{
|
{
|
||||||
return m_idCmdMap.values();
|
return m_idCmdMap.values();
|
||||||
}
|
}
|
||||||
@@ -322,7 +322,7 @@ ICommand *ActionManagerPrivate::registerOverridableAction(QAction *action, const
|
|||||||
{
|
{
|
||||||
OverrideableAction *a = 0;
|
OverrideableAction *a = 0;
|
||||||
const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
const int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
||||||
if (Command *c = m_idCmdMap.value(uid, 0)) {
|
if (CommandPrivate *c = m_idCmdMap.value(uid, 0)) {
|
||||||
if (c->type() != ICommand::CT_OverridableAction) {
|
if (c->type() != ICommand::CT_OverridableAction) {
|
||||||
qWarning() << "registerAction: id" << id << "is registered with a different command type.";
|
qWarning() << "registerAction: id" << id << "is registered with a different command type.";
|
||||||
return c;
|
return c;
|
||||||
@@ -368,7 +368,7 @@ ICommand *ActionManagerPrivate::registerShortcut(QShortcut *shortcut, const QStr
|
|||||||
{
|
{
|
||||||
Shortcut *sc = 0;
|
Shortcut *sc = 0;
|
||||||
int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
int uid = m_mainWnd->uniqueIDManager()->uniqueIdentifier(id);
|
||||||
if (Command *c = m_idCmdMap.value(uid, 0)) {
|
if (CommandPrivate *c = m_idCmdMap.value(uid, 0)) {
|
||||||
if (c->type() != ICommand::CT_Shortcut) {
|
if (c->type() != ICommand::CT_Shortcut) {
|
||||||
qWarning() << "registerShortcut: id" << id << "is registered with a different command type.";
|
qWarning() << "registerShortcut: id" << id << "is registered with a different command type.";
|
||||||
return c;
|
return c;
|
||||||
@@ -476,7 +476,7 @@ void ActionManagerPrivate::saveSettings(QSettings *settings)
|
|||||||
const IdCmdMap::const_iterator cmdcend = m_idCmdMap.constEnd();
|
const IdCmdMap::const_iterator cmdcend = m_idCmdMap.constEnd();
|
||||||
for (IdCmdMap::const_iterator j = m_idCmdMap.constBegin(); j != cmdcend; ++j) {
|
for (IdCmdMap::const_iterator j = m_idCmdMap.constBegin(); j != cmdcend; ++j) {
|
||||||
const int id = j.key();
|
const int id = j.key();
|
||||||
Command *cmd = j.value();
|
CommandPrivate *cmd = j.value();
|
||||||
QKeySequence key = cmd->keySequence();
|
QKeySequence key = cmd->keySequence();
|
||||||
if (key != cmd->defaultKeySequence()) {
|
if (key != cmd->defaultKeySequence()) {
|
||||||
const QString sid = m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(id);
|
const QString sid = m_mainWnd->uniqueIDManager()->stringForUniqueIdentifier(id);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Internal {
|
|||||||
|
|
||||||
class ActionContainerPrivate;
|
class ActionContainerPrivate;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
class Command;
|
class CommandPrivate;
|
||||||
|
|
||||||
class ActionManagerPrivate : public Core::ActionManager
|
class ActionManagerPrivate : public Core::ActionManager
|
||||||
{
|
{
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
void saveSettings(QSettings *settings);
|
void saveSettings(QSettings *settings);
|
||||||
QList<int> defaultGroups() const;
|
QList<int> defaultGroups() const;
|
||||||
|
|
||||||
QList<Command *> commands() const;
|
QList<CommandPrivate *> commands() const;
|
||||||
QList<ActionContainerPrivate *> containers() const;
|
QList<ActionContainerPrivate *> containers() const;
|
||||||
|
|
||||||
bool hasContext(int context) const;
|
bool hasContext(int context) const;
|
||||||
@@ -104,7 +104,7 @@ private:
|
|||||||
static ActionManagerPrivate* m_instance;
|
static ActionManagerPrivate* m_instance;
|
||||||
QList<int> m_defaultGroups;
|
QList<int> m_defaultGroups;
|
||||||
|
|
||||||
typedef QHash<int, Command *> IdCmdMap;
|
typedef QHash<int, CommandPrivate *> IdCmdMap;
|
||||||
IdCmdMap m_idCmdMap;
|
IdCmdMap m_idCmdMap;
|
||||||
|
|
||||||
typedef QHash<int, ActionContainerPrivate *> IdContainerMap;
|
typedef QHash<int, ActionContainerPrivate *> IdContainerMap;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <QtGui/QAction>
|
#include <QtGui/QAction>
|
||||||
#include <QtGui/QShortcut>
|
#include <QtGui/QShortcut>
|
||||||
|
|
||||||
#include "command.h"
|
#include "command_p.h"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Core::ICommand
|
\class Core::ICommand
|
||||||
@@ -105,170 +105,111 @@
|
|||||||
using namespace Core::Internal;
|
using namespace Core::Internal;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Command
|
\class CommandPrivate
|
||||||
\ingroup qwb
|
\inheaderfile command_p.h
|
||||||
\inheaderfile command.h
|
\internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
CommandPrivate::CommandPrivate(CommandType type, int id)
|
||||||
\enum Command::CommandState
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn Command::Command(CommandType type, int id)
|
|
||||||
*/
|
|
||||||
Command::Command(CommandType type, int id)
|
|
||||||
: m_type(type), m_id(id)
|
: m_type(type), m_id(id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void CommandPrivate::setStateFlags(int state)
|
||||||
\fn virtual Command::~Command()
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
...
|
|
||||||
*/
|
|
||||||
void Command::setStateFlags(int state)
|
|
||||||
{
|
{
|
||||||
m_type |= (state & CS_Mask);
|
m_type |= (state & CS_Mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
int CommandPrivate::stateFlags() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
int Command::stateFlags() const
|
|
||||||
{
|
{
|
||||||
return (m_type & CS_Mask);
|
return (m_type & CS_Mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void CommandPrivate::setCategory(const QString &name)
|
||||||
\fn virtual QString Command::name() const
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
...
|
|
||||||
*/
|
|
||||||
void Command::setCategory(const QString &name)
|
|
||||||
{
|
{
|
||||||
m_category = name;
|
m_category = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
QString CommandPrivate::category() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
QString Command::category() const
|
|
||||||
{
|
{
|
||||||
if (m_category.isEmpty())
|
if (m_category.isEmpty())
|
||||||
return QObject::tr("Other");
|
return QObject::tr("Other");
|
||||||
return m_category;
|
return m_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void CommandPrivate::setDefaultKeySequence(const QKeySequence &key)
|
||||||
...
|
|
||||||
*/
|
|
||||||
void Command::setDefaultKeySequence(const QKeySequence &key)
|
|
||||||
{
|
{
|
||||||
m_defaultKey = key;
|
m_defaultKey = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
QKeySequence CommandPrivate::defaultKeySequence() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
QKeySequence Command::defaultKeySequence() const
|
|
||||||
{
|
{
|
||||||
return m_defaultKey;
|
return m_defaultKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Command::setDefaultText(const QString &text)
|
void CommandPrivate::setDefaultText(const QString &text)
|
||||||
{
|
{
|
||||||
m_defaultText = text;
|
m_defaultText = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Command::defaultText() const
|
QString CommandPrivate::defaultText() const
|
||||||
{
|
{
|
||||||
return m_defaultText;
|
return m_defaultText;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
int CommandPrivate::id() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
int Command::id() const
|
|
||||||
{
|
{
|
||||||
return m_id;
|
return m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
CommandPrivate::CommandType CommandPrivate::type() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
Command::CommandType Command::type() const
|
|
||||||
{
|
{
|
||||||
return (CommandType)(m_type & CT_Mask);
|
return (CommandType)(m_type & CT_Mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
QAction *CommandPrivate::action() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
QAction *Command::action() const
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
QShortcut *CommandPrivate::shortcut() const
|
||||||
...
|
|
||||||
*/
|
|
||||||
QShortcut *Command::shortcut() const
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void CommandPrivate::setAttribute(CommandAttribute attr)
|
||||||
...
|
|
||||||
*/
|
|
||||||
void Command::setAttribute(CommandAttribute attr)
|
|
||||||
{
|
{
|
||||||
m_type |= attr;
|
m_type |= attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void CommandPrivate::removeAttribute(CommandAttribute attr)
|
||||||
...
|
|
||||||
*/
|
|
||||||
void Command::removeAttribute(CommandAttribute attr)
|
|
||||||
{
|
{
|
||||||
m_type &= ~attr;
|
m_type &= ~attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
bool CommandPrivate::hasAttribute(CommandAttribute attr) const
|
||||||
...
|
|
||||||
*/
|
|
||||||
bool Command::hasAttribute(CommandAttribute attr) const
|
|
||||||
{
|
{
|
||||||
return (m_type & attr);
|
return (m_type & attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Command::stringWithAppendedShortcut(const QString &str) const
|
QString CommandPrivate::stringWithAppendedShortcut(const QString &str) const
|
||||||
{
|
{
|
||||||
return QString("%1 <span style=\"color: gray; font-size: small\">%2</span>").arg(str).arg(
|
return QString("%1 <span style=\"color: gray; font-size: small\">%2</span>").arg(str).arg(
|
||||||
keySequence().toString(QKeySequence::NativeText));
|
keySequence().toString(QKeySequence::NativeText));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn virtual bool Command::setCurrentContext(const QList<int> &context) = 0
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ---------- Shortcut ------------
|
// ---------- Shortcut ------------
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Shortcut
|
\class Shortcut
|
||||||
\ingroup qwb
|
\ingroup qwb
|
||||||
\inheaderfile command.h
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
...
|
...
|
||||||
*/
|
*/
|
||||||
Shortcut::Shortcut(int id)
|
Shortcut::Shortcut(int id)
|
||||||
: Command(CT_Shortcut, id), m_shortcut(0)
|
: CommandPrivate(CT_Shortcut, id), m_shortcut(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -322,7 +263,7 @@ QList<int> Shortcut::context() const
|
|||||||
void Shortcut::setDefaultKeySequence(const QKeySequence &key)
|
void Shortcut::setDefaultKeySequence(const QKeySequence &key)
|
||||||
{
|
{
|
||||||
setKeySequence(key);
|
setKeySequence(key);
|
||||||
Command::setDefaultKeySequence(key);
|
CommandPrivate::setDefaultKeySequence(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shortcut::setKeySequence(const QKeySequence &key)
|
void Shortcut::setKeySequence(const QKeySequence &key)
|
||||||
@@ -374,14 +315,13 @@ bool Shortcut::isActive() const
|
|||||||
/*!
|
/*!
|
||||||
\class Action
|
\class Action
|
||||||
\ingroup qwb
|
\ingroup qwb
|
||||||
\inheaderfile command.h
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
...
|
...
|
||||||
*/
|
*/
|
||||||
Action::Action(CommandType type, int id)
|
Action::Action(CommandType type, int id)
|
||||||
: Command(type, id), m_action(0)
|
: CommandPrivate(type, id), m_action(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -439,7 +379,7 @@ QList<CommandLocation> Action::locations() const
|
|||||||
void Action::setDefaultKeySequence(const QKeySequence &key)
|
void Action::setDefaultKeySequence(const QKeySequence &key)
|
||||||
{
|
{
|
||||||
setKeySequence(key);
|
setKeySequence(key);
|
||||||
Command::setDefaultKeySequence(key);
|
CommandPrivate::setDefaultKeySequence(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Action::setKeySequence(const QKeySequence &key)
|
void Action::setKeySequence(const QKeySequence &key)
|
||||||
@@ -467,7 +407,6 @@ QKeySequence Action::keySequence() const
|
|||||||
/*!
|
/*!
|
||||||
\class OverrideableAction
|
\class OverrideableAction
|
||||||
\ingroup qwb
|
\ingroup qwb
|
||||||
\inheaderfile command.h
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
**
|
**
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef COMMAND_H
|
#ifndef COMMAND_P_H
|
||||||
#define COMMAND_H
|
#define COMMAND_P_H
|
||||||
|
|
||||||
#include "icommand.h"
|
#include "icommand.h"
|
||||||
#include "actionmanager_p.h"
|
#include "actionmanager_p.h"
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class Command : public Core::ICommand
|
class CommandPrivate : public Core::ICommand
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -56,8 +56,8 @@ public:
|
|||||||
CS_Mask = 0xFF0000
|
CS_Mask = 0xFF0000
|
||||||
};
|
};
|
||||||
|
|
||||||
Command(CommandType type, int id);
|
CommandPrivate(CommandType type, int id);
|
||||||
virtual ~Command() {}
|
virtual ~CommandPrivate() {}
|
||||||
|
|
||||||
void setStateFlags(int state);
|
void setStateFlags(int state);
|
||||||
int stateFlags() const;
|
int stateFlags() const;
|
||||||
@@ -95,7 +95,7 @@ protected:
|
|||||||
QString m_defaultText;
|
QString m_defaultText;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Shortcut : public Command
|
class Shortcut : public CommandPrivate
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -124,7 +124,7 @@ private:
|
|||||||
QString m_defaultText;
|
QString m_defaultText;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Action : public Command
|
class Action : public CommandPrivate
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -176,4 +176,4 @@ private:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
#endif // COMMAND_H
|
#endif // COMMAND_P_H
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "coreimpl.h"
|
#include "coreimpl.h"
|
||||||
#include "commandsfile.h"
|
#include "commandsfile.h"
|
||||||
#include "shortcutsettings.h"
|
#include "shortcutsettings.h"
|
||||||
#include "command.h"
|
#include "command_p.h"
|
||||||
|
|
||||||
#include <coreplugin/uniqueidmanager.h>
|
#include <coreplugin/uniqueidmanager.h>
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ HEADERS += mainwindow.h \
|
|||||||
actionmanager/actionmanager.h \
|
actionmanager/actionmanager.h \
|
||||||
actionmanager/icommand.h \
|
actionmanager/icommand.h \
|
||||||
actionmanager/actionmanager_p.h \
|
actionmanager/actionmanager_p.h \
|
||||||
actionmanager/command.h \
|
actionmanager/command_p.h \
|
||||||
actionmanager/actioncontainer_p.h \
|
actionmanager/actioncontainer_p.h \
|
||||||
actionmanager/commandsfile.h \
|
actionmanager/commandsfile.h \
|
||||||
dialogs/saveitemsdialog.h \
|
dialogs/saveitemsdialog.h \
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "shortcutsettings.h"
|
#include "shortcutsettings.h"
|
||||||
#include "ui_shortcutsettings.h"
|
#include "ui_shortcutsettings.h"
|
||||||
#include "actionmanager_p.h"
|
#include "actionmanager_p.h"
|
||||||
#include "command.h"
|
#include "command_p.h"
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
#include "coreimpl.h"
|
#include "coreimpl.h"
|
||||||
#include "commandsfile.h"
|
#include "commandsfile.h"
|
||||||
@@ -285,10 +285,10 @@ void ShortcutSettings::initialize()
|
|||||||
UniqueIDManager *uidm =
|
UniqueIDManager *uidm =
|
||||||
CoreImpl::instance()->uniqueIDManager();
|
CoreImpl::instance()->uniqueIDManager();
|
||||||
|
|
||||||
QList<Command *> cmds = m_am->commands();
|
QList<CommandPrivate *> cmds = m_am->commands();
|
||||||
for (int i = 0; i < cmds.size(); ++i) {
|
for (int i = 0; i < cmds.size(); ++i) {
|
||||||
Command *c = cmds.at(i);
|
CommandPrivate *c = cmds.at(i);
|
||||||
if (c->hasAttribute(Command::CA_NonConfigureable))
|
if (c->hasAttribute(CommandPrivate::CA_NonConfigureable))
|
||||||
continue;
|
continue;
|
||||||
if (c->action() && c->action()->isSeparator())
|
if (c->action() && c->action()->isSeparator())
|
||||||
continue;
|
continue;
|
||||||
@@ -313,7 +313,7 @@ void ShortcutSettings::initialize()
|
|||||||
item->setText(0, uidm->stringForUniqueIdentifier(c->id()));
|
item->setText(0, uidm->stringForUniqueIdentifier(c->id()));
|
||||||
|
|
||||||
if (c->action()) {
|
if (c->action()) {
|
||||||
QString text = c->hasAttribute(Command::CA_UpdateText) && !c->defaultText().isNull() ? c->defaultText() : c->action()->text();
|
QString text = c->hasAttribute(CommandPrivate::CA_UpdateText) && !c->defaultText().isNull() ? c->defaultText() : c->action()->text();
|
||||||
s->m_key = c->action()->shortcut();
|
s->m_key = c->action()->shortcut();
|
||||||
item->setText(1, text);
|
item->setText(1, text);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ class ICommand;
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ActionManagerPrivate;
|
class ActionManagerPrivate;
|
||||||
class Command;
|
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
|
|
||||||
struct ShortcutItem
|
struct ShortcutItem
|
||||||
|
|||||||
Reference in New Issue
Block a user