diff options
Diffstat (limited to 'src/corelib/kernel/qmetaobject.h')
-rw-r--r-- | src/corelib/kernel/qmetaobject.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index 85ac7e77e4..40b2aa6402 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -168,19 +168,15 @@ public: inline bool isValid() const { return mobj != Q_NULLPTR; } -#ifdef Q_QDOC - static QMetaMethod fromSignal(PointerToMemberFunction signal); -#else - template <typename Func> - static inline QMetaMethod fromSignal(Func signal) + template <typename PointerToMemberFunction> + static inline QMetaMethod fromSignal(PointerToMemberFunction signal) { - typedef QtPrivate::FunctionPointer<Func> SignalType; + typedef QtPrivate::FunctionPointer<PointerToMemberFunction> SignalType; Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro<typename SignalType::Object>::Value, "No Q_OBJECT in the class with the signal"); return fromSignalImpl(&SignalType::Object::staticMetaObject, reinterpret_cast<void **>(&signal)); } -#endif private: #if QT_DEPRECATED_SINCE(5,0) @@ -214,6 +210,7 @@ public: const char *name() const; bool isFlag() const; + bool isScoped() const; int keyCount() const; const char *key(int index) const; |