summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-01-20 15:58:10 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2017-01-27 10:30:31 +0000
commit30d0e1770c3d917d5bdae5e8766e401b4f1b4c2b (patch)
tree8208e4139218442c15cb3bccc13a659d15caa78a /src/corelib/kernel/qobject.h
parentd03ba0e895a3719ce527f3d7ee9262fb26065332 (diff)
Use std::enable_if instead of QEnableIf
Change-Id: Ideca8283141484cb6da47c50333f5c96e416f082 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index d42eb2a13d..6941c55896 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -261,7 +261,7 @@ public:
//connect to a function pointer (not a member)
template <typename Func1, typename Func2>
- static inline typename QtPrivate::QEnableIf<int(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0, QMetaObject::Connection>::Type
+ static inline typename std::enable_if<int(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0, QMetaObject::Connection>::type
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
{
return connect(sender, signal, sender, slot, Qt::DirectConnection);
@@ -269,8 +269,8 @@ public:
//connect to a function pointer (not a member)
template <typename Func1, typename Func2>
- static inline typename QtPrivate::QEnableIf<int(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0 &&
- !QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction, QMetaObject::Connection>::Type
+ static inline typename std::enable_if<int(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0 &&
+ !QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction, QMetaObject::Connection>::type
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
Qt::ConnectionType type = Qt::AutoConnection)
{
@@ -301,7 +301,7 @@ public:
//connect to a functor
template <typename Func1, typename Func2>
- static inline typename QtPrivate::QEnableIf<QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1, QMetaObject::Connection>::Type
+ static inline typename std::enable_if<QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1, QMetaObject::Connection>::type
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot)
{
return connect(sender, signal, sender, slot, Qt::DirectConnection);
@@ -309,7 +309,7 @@ public:
//connect to a functor, with a "context" object defining in which event loop is going to be executed
template <typename Func1, typename Func2>
- static inline typename QtPrivate::QEnableIf<QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1, QMetaObject::Connection>::Type
+ static inline typename std::enable_if<QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1, QMetaObject::Connection>::type
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
Qt::ConnectionType type = Qt::AutoConnection)
{