+QKeySequence Action::shortcut(ShortcutTypes type) const
+{
+ Q_ASSERT(type);
+ if (type == DefaultShortcut) {
+ auto sequence = property("defaultShortcuts").value<QList<QKeySequence>>();
+ return sequence.isEmpty() ? QKeySequence() : sequence.first();
+ }
+
+ return shortcuts().isEmpty() ? QKeySequence() : shortcuts().first();