summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-05-30 13:18:21 -0300
committerThiago Macieira <thiago.macieira@intel.com>2016-06-02 20:52:53 +0000
commit7b8a553a130125ef4cf2592879ea8c438aa3d966 (patch)
tree9e4267df1b32bd827796594e213d76d4fb358919 /src/corelib/kernel/qobject.h
parent84bd6a83a02f6357978dbf3e8b3a553a96d22772 (diff)
Remove the code for QObject::connect for non-C++11 compilers
It's required now in Qt 5.7 (at least the required features of rvalue references and variadic templates) Change-Id: I87e17314d8b24ae983b1fffd145364c52f9bb6c3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r--src/corelib/kernel/qobject.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 1f3d3dcfc7..e99c8f35f3 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -299,7 +299,6 @@ public:
connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot,
Qt::ConnectionType type = Qt::AutoConnection)
{
-#if defined (Q_COMPILER_VARIADIC_TEMPLATES)
typedef QtPrivate::FunctionPointer<Func1> SignalType;
const int FunctorArgumentCount = QtPrivate::ComputeFunctorArgumentCount<Func2 , typename SignalType::Arguments>::Value;
@@ -307,28 +306,6 @@ public:
"Signal and slot arguments are not compatible.");
const int SlotArgumentCount = (FunctorArgumentCount >= 0) ? FunctorArgumentCount : 0;
typedef typename QtPrivate::FunctorReturnType<Func2, typename QtPrivate::List_Left<typename SignalType::Arguments, SlotArgumentCount>::Value>::Value SlotReturnType;
-#else
- // Without variadic template, we don't detect the best overload of operator(). We just
- // assume there is only one simple operator() and connect to &Func2::operator()
-
- /* If you get an error such as:
- couldn't deduce template parameter 'Func2Operator'
- or
- cannot resolve address of overloaded function
- It means the functor does not have a single operator().
- Functors with overloaded or templated operator() are only supported if the compiler supports
- C++11 variadic templates
- */
- typedef QtPrivate::FunctionPointer<decltype(&Func2::operator())> SlotType ;
- typedef QtPrivate::FunctionPointer<Func1> SignalType;
- typedef typename SlotType::ReturnType SlotReturnType;
- const int SlotArgumentCount = SlotType::ArgumentCount;
-
- Q_STATIC_ASSERT_X(int(SignalType::ArgumentCount) >= SlotArgumentCount,
- "The slot requires more arguments than the signal provides.");
- Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
- "Signal and slot arguments are not compatible.");
-#endif
Q_STATIC_ASSERT_X((QtPrivate::AreArgumentsCompatible<SlotReturnType, typename SignalType::ReturnType>::value),
"Return type of the slot is not compatible with the return type of the signal.");