diff options
-rw-r--r-- | src/corelib/global/qnamespace.h | 1 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 7 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 31 |
3 files changed, 4 insertions, 35 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 2a501dec7e..cef244f7b3 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1193,7 +1193,6 @@ public: AutoConnection, DirectConnection, QueuedConnection, - AutoCompatConnection, BlockingQueuedConnection, UniqueConnection = 0x80 }; diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index d755e26e21..771f974011 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -537,13 +537,6 @@ same pair of objects, then the connection will fail. This connection type was introduced in Qt 4.6. - \value AutoCompatConnection - The default type when Qt 3 support is enabled. Same as - AutoConnection but will also cause warnings to be output in - certain situations. See \l{Porting to Qt 4#Compatibility - Signals and Slots}{Compatibility Signals and Slots} for - further information. - With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index e41a7cf92e..ad57362e1a 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2337,16 +2337,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign const QObject *receiver, const char *method, Qt::ConnectionType type) { -#ifndef QT_NO_DEBUG - bool warnCompat = true; -#endif - if (type == Qt::AutoCompatConnection) { - type = Qt::AutoConnection; -#ifndef QT_NO_DEBUG - warnCompat = false; -#endif - } - if (sender == 0 || receiver == 0 || signal == 0 || method == 0) { qWarning("QObject::connect: Cannot connect %s::%s to %s::%s", sender ? sender->metaObject()->className() : "(null)", @@ -2455,11 +2445,9 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign } #ifndef QT_NO_DEBUG - if (warnCompat) { - QMetaMethod smethod = smeta->method(signal_absolute_index); - QMetaMethod rmethod = rmeta->method(method_index_relative + rmeta->methodOffset()); - check_and_warn_compat(smeta, smethod, rmeta, rmethod); - } + QMetaMethod smethod = smeta->method(signal_absolute_index); + QMetaMethod rmethod = rmeta->method(method_index_relative + rmeta->methodOffset()); + check_and_warn_compat(smeta, smethod, rmeta, rmethod); #endif QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect( sender, signal_index, receiver, method_index_relative, rmeta ,type, types)); @@ -2494,16 +2482,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) { -#ifndef QT_NO_DEBUG - bool warnCompat = true; -#endif - if (type == Qt::AutoCompatConnection) { - type = Qt::AutoConnection; -#ifndef QT_NO_DEBUG - warnCompat = false; -#endif - } - if (sender == 0 || receiver == 0 || signal.methodType() != QMetaMethod::Signal @@ -2557,8 +2535,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho return QMetaObject::Connection(0); #ifndef QT_NO_DEBUG - if (warnCompat) - check_and_warn_compat(smeta, signal, rmeta, method); + check_and_warn_compat(smeta, signal, rmeta, method); #endif QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect( sender, signal_index, receiver, method_index, 0, type, types)); |