diff --git a/src/widgets/kernel/qshortcut.h b/src/widgets/kernel/qshortcut.h index 4f9c5ba0f71..384f1967c95 100644 --- a/src/widgets/kernel/qshortcut.h +++ b/src/widgets/kernel/qshortcut.h @@ -95,7 +95,8 @@ public: template QShortcut(const QKeySequence &key, QWidget *parent, const Obj1 *object1, Func1 slot1, - Qt::ShortcutContext context = Qt::WindowShortcut) + Qt::ShortcutContext context = Qt::WindowShortcut, + typename std::enable_if::Value>::type* = 0) : QShortcut(key, parent, static_cast(nullptr), static_cast(nullptr), context) { connect(this, &QShortcut::activated, object1, std::move(slot1)); @@ -103,7 +104,8 @@ public: template QShortcut(const QKeySequence &key, QWidget *parent, const Obj1 *object1, Func1 slot1, Func2 slot2, - Qt::ShortcutContext context = Qt::WindowShortcut) + Qt::ShortcutContext context = Qt::WindowShortcut, + typename std::enable_if::Value>::type* = 0) : QShortcut(key, parent, static_cast(nullptr), static_cast(nullptr), context) { connect(this, &QShortcut::activated, object1, std::move(slot1)); @@ -113,7 +115,9 @@ public: QShortcut(const QKeySequence &key, QWidget *parent, const Obj1 *object1, Func1 slot1, const Obj2 *object2, Func2 slot2, - Qt::ShortcutContext context = Qt::WindowShortcut) + Qt::ShortcutContext context = Qt::WindowShortcut, + typename std::enable_if::Value>::type* = 0, + typename std::enable_if::Value>::type* = 0) : QShortcut(key, parent, static_cast(nullptr), static_cast(nullptr), context) { connect(this, &QShortcut::activated, object1, std::move(slot1));