Commit 8fbb33a5 authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix build without KGlobalAccel

KGlobalShortcutInfo also comes from there.
parent 717ced2d
...@@ -70,7 +70,9 @@ public: ...@@ -70,7 +70,9 @@ public:
bool promptStealLocalShortcut(const QList<QAction *> &actions, const QKeySequence &seq); bool promptStealLocalShortcut(const QList<QAction *> &actions, const QKeySequence &seq);
bool promptstealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq); bool promptstealStandardShortcut(KStandardShortcut::StandardShortcut std, const QKeySequence &seq);
#if HAVE_GLOBALACCEL
bool promptStealGlobalShortcut(const QHash<QKeySequence, QList<KGlobalShortcutInfo> > &shortcuts, const QKeySequence &sequence); bool promptStealGlobalShortcut(const QHash<QKeySequence, QList<KGlobalShortcutInfo> > &shortcuts, const QKeySequence &sequence);
#endif
void wontStealShortcut(QAction *item, const QKeySequence &seq); void wontStealShortcut(QAction *item, const QKeySequence &seq);
bool checkAgainstStandardShortcuts() const bool checkAgainstStandardShortcuts() const
...@@ -263,9 +265,9 @@ bool KKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &k ...@@ -263,9 +265,9 @@ bool KKeySequenceWidgetPrivate::conflictWithLocalShortcuts(const QKeySequence &k
return true; return true;
} }
#if HAVE_GLOBALACCEL
bool KKeySequenceWidgetPrivate::promptStealGlobalShortcut(const QHash<QKeySequence, QList<KGlobalShortcutInfo> > &clashing, const QKeySequence &sequence) bool KKeySequenceWidgetPrivate::promptStealGlobalShortcut(const QHash<QKeySequence, QList<KGlobalShortcutInfo> > &clashing, const QKeySequence &sequence)
{ {
#ifdef HAVE_GLOBALACCEL
QString clashingKeys; QString clashingKeys;
for (auto it = clashing.begin(); it != clashing.end(); ++it) { for (auto it = clashing.begin(); it != clashing.end(); ++it) {
const auto seqAsString = it.key().toString(); const auto seqAsString = it.key().toString();
...@@ -286,10 +288,8 @@ bool KKeySequenceWidgetPrivate::promptStealGlobalShortcut(const QHash<QKeySequen ...@@ -286,10 +288,8 @@ bool KKeySequenceWidgetPrivate::promptStealGlobalShortcut(const QHash<QKeySequen
"Conflict with Registered Global Shortcut", "Conflict with Registered Global Shortcuts", hashSize); "Conflict with Registered Global Shortcut", "Conflict with Registered Global Shortcuts", hashSize);
return KMessageBox::warningContinueCancel(q, message, title, KGuiItem(i18nc("@action:button", "Reassign"))) == KMessageBox::Continue; return KMessageBox::warningContinueCancel(q, message, title, KGuiItem(i18nc("@action:button", "Reassign"))) == KMessageBox::Continue;
#else
return true;
#endif
} }
#endif
bool KKeySequenceWidgetPrivate::conflictWithGlobalShortcuts(const QKeySequence &keySequence) bool KKeySequenceWidgetPrivate::conflictWithGlobalShortcuts(const QKeySequence &keySequence)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment