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