summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorDebao Zhang <dbzhang800@gmail.com>2012-03-23 14:43:07 -0700
committerQt by Nokia <qt-info@nokia.com>2012-03-28 11:22:11 +0200
commit5e80eb7917c5b4d319766a3cf5122391f54c40a7 (patch)
treeecbbd21f8f629498560c12195a42bccd2c5be51b /src/corelib/kernel
parenta5a80da2238030b5ecbc7c5fba7ecd8cb5f2da1c (diff)
Remove AutoCompatConnection
The default type when Qt 3 support is enabled. Same as AutoConnection but will also cause warnings to be output in certain situations. Change-Id: I64bf3c39a740afb716820bfd3173936fda213f4a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qobject.cpp31
1 files changed, 4 insertions, 27 deletions
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));