summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--src/corelib/global/qnamespace.h1
-rw-r--r--src/corelib/global/qnamespace.qdoc7
-rw-r--r--src/corelib/kernel/qobject.cpp31
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));