diff --git a/src/dolphinremoveaction.cpp b/src/dolphinremoveaction.cpp index c91d74579..10ab25112 100644 --- a/src/dolphinremoveaction.cpp +++ b/src/dolphinremoveaction.cpp @@ -1,61 +1,61 @@ /*************************************************************************** * Copyright (C) 2013 by Dawit Alemayehu #include DolphinRemoveAction::DolphinRemoveAction(QObject* parent, KActionCollection* collection) : QAction(parent), m_collection(collection) { update(); connect(this, &DolphinRemoveAction::triggered, this, &DolphinRemoveAction::slotRemoveActionTriggered); } void DolphinRemoveAction::slotRemoveActionTriggered() { if (m_action) { m_action->trigger(); } } void DolphinRemoveAction::update() { Q_ASSERT(m_collection); // Using setText(action->text()) does not apply the &-shortcut. // This is only done until the original action has been shown at least once. To // bypass this issue, the text and &-shortcut is applied manually. - if (qApp->keyboardModifiers() & Qt::ShiftModifier) { + if (qApp->queryKeyboardModifiers() & Qt::ShiftModifier) { m_action = m_collection ? m_collection->action(QStringLiteral("delete")) : 0; setText(i18nc("@action:inmenu", "&Delete")); } else { m_action = m_collection ? m_collection->action(QStringLiteral("move_to_trash")) : 0; setText(i18nc("@action:inmenu", "&Move to Trash")); } if (m_action) { setIcon(m_action->icon()); m_collection->setDefaultShortcuts(this, m_action->shortcuts()); setEnabled(m_action->isEnabled()); } }