cleanup interface of Core::Context

This commit is contained in:
hjk
2010-06-25 18:05:09 +02:00
parent 46e55681a5
commit 1181765a24
8 changed files with 41 additions and 29 deletions

View File

@@ -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) {