mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
Don't try to register empty global shortcuts (avoids loads of warnings being printed to stderr)
This commit is contained in:
parent
492d8fec87
commit
c701c49004
@ -36,6 +36,9 @@ bool QxtGlobalShortcutBackend::DoRegister() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void QxtGlobalShortcutBackend::AddShortcut(QAction* action) {
|
void QxtGlobalShortcutBackend::AddShortcut(QAction* action) {
|
||||||
|
if (action->shortcut().isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(action->shortcut(), this);
|
QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(action->shortcut(), this);
|
||||||
connect(shortcut, SIGNAL(activated()), action, SLOT(trigger()));
|
connect(shortcut, SIGNAL(activated()), action, SLOT(trigger()));
|
||||||
shortcuts_ << shortcut;
|
shortcuts_ << shortcut;
|
||||||
|
Loading…
Reference in New Issue
Block a user