KDE Frameworks slightly altered the way it handles default shortcuts
for actions; the property name was changed to support lists of
shortcuts. This issue lead to default shortcuts not being active for
Quassel built against KDE Frameworks.
QKeySequence Action::shortcut(ShortcutTypes type) const
{
Q_ASSERT(type);
QKeySequence Action::shortcut(ShortcutTypes type) const
{
Q_ASSERT(type);
- if (type == DefaultShortcut)
- return property("defaultShortcut").value<QKeySequence>();
+ if (type == DefaultShortcut) {
+ auto sequence = property("defaultShortcuts").value<QList<QKeySequence>>();
+ return sequence.isEmpty() ? QKeySequence() : sequence.first();
+ }
- if (shortcuts().count()) return shortcuts().value(0);
- return QKeySequence();
+ return shortcuts().isEmpty() ? QKeySequence() : shortcuts().first();
Q_ASSERT(type);
if (type & DefaultShortcut)
Q_ASSERT(type);
if (type & DefaultShortcut)
- setProperty("defaultShortcut", key);
+ setProperty("defaultShortcuts", QVariant::fromValue(QList<QKeySequence>() << key));
if (type & ActiveShortcut)
QAction::setShortcut(key);
if (type & ActiveShortcut)
QAction::setShortcut(key);