forked from qt-creator/qt-creator
cleanup interface of Core::Context
This commit is contained in:
@@ -336,8 +336,8 @@ QString Shortcut::defaultText() const
|
||||
|
||||
bool Shortcut::setCurrentContext(const Core::Context &context)
|
||||
{
|
||||
foreach (int ctxt, m_context.d) {
|
||||
if (context.d.contains(ctxt)) {
|
||||
foreach (int ctxt, m_context) {
|
||||
if (context.contains(ctxt)) {
|
||||
if (!m_shortcut->isEnabled()) {
|
||||
m_shortcut->setEnabled(true);
|
||||
emit activeStateChanged();
|
||||
@@ -487,7 +487,7 @@ static inline QString msgActionWarning(QAction *newAction, int k, QAction *oldAc
|
||||
|
||||
void Action::addOverrideAction(QAction *action, const Core::Context &context)
|
||||
{
|
||||
if (context.d.isEmpty()) {
|
||||
if (context.isEmpty()) {
|
||||
m_contextActionMap.insert(0, action);
|
||||
} else {
|
||||
for (int i = 0; i < context.size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user