summaryrefslogtreecommitdiffhomepage
path: root/qxt-mini/qxtglobalshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qxt-mini/qxtglobalshortcut.cpp')
-rw-r--r--qxt-mini/qxtglobalshortcut.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qxt-mini/qxtglobalshortcut.cpp b/qxt-mini/qxtglobalshortcut.cpp
index 44b9f917..8515a6b2 100644
--- a/qxt-mini/qxtglobalshortcut.cpp
+++ b/qxt-mini/qxtglobalshortcut.cpp
@@ -74,6 +74,7 @@ QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate()
bool QxtGlobalShortcutPrivate::setShortcut(const QKeySequence& shortcut)
{
+ if (shortcut.toString() == "") return false;
Qt::KeyboardModifiers allMods = Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier;
key = shortcut.isEmpty() ? Qt::Key(0) : Qt::Key((shortcut[0] ^ allMods) & shortcut[0]);
mods = shortcut.isEmpty() ? Qt::KeyboardModifiers(0) : Qt::KeyboardModifiers(shortcut[0] & allMods);