summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-04-24 23:57:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-15 04:57:37 +0200
commitf544d7189ec8fc5096015a1a649ee2e317efd893 (patch)
treec6a44e8600f7ebc0be539dacb6721cf77c1d82ab /src
parent57c755fef00c8269b083817228f046e4d950a580 (diff)
Remove const char *-based connectNotify() API
This completes the transition from connectNotify(const char *) and disconnectNotify(const char *) to the new QMetaMethod-based functions. Removed the old connectNotify autotests and renamed the connectNotifyMethodXXX autotests to connectNotify, since there is no longer any ambiguity about which overload is being tested. Change-Id: Icf108a80177155f21bb73c165fb8ab5d4e997bc2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qobject.cpp37
-rw-r--r--src/corelib/kernel/qobject.h3
2 files changed, 0 insertions, 40 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 9dbc92d32f..29a4767d28 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2509,8 +2509,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
#endif
QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect(
sender, signal_index, smeta, receiver, method_index_relative, rmeta ,type, types));
- if (handle)
- const_cast<QObject*>(sender)->connectNotify(signal - 1);
return handle;
}
@@ -2552,12 +2550,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
return QMetaObject::Connection(0);
}
- // Reconstructing SIGNAL() macro result for signal.methodSignature() string
- QByteArray signalSignature;
- signalSignature.reserve(signal.methodSignature().size()+1);
- signalSignature.append((char)(QSIGNAL_CODE + '0'));
- signalSignature.append(signal.methodSignature());
-
int signal_index;
int method_index;
{
@@ -2597,8 +2589,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
#endif
QMetaObject::Connection handle = QMetaObject::Connection(QMetaObjectPrivate::connect(
sender, signal_index, signal.enclosingMetaObject(), receiver, method_index, 0, type, types));
- if (handle)
- const_cast<QObject*>(sender)->connectNotify(signalSignature.constData());
return handle;
}
@@ -2782,7 +2772,6 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
if (res) {
if (!signal)
const_cast<QObject*>(sender)->disconnectNotify(QMetaMethod());
- const_cast<QObject*>(sender)->disconnectNotify(signal ? (signal - 1) : 0);
}
return res;
}
@@ -2878,7 +2867,6 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
// QMetaMethod as argument, as documented.
const_cast<QObject*>(sender)->disconnectNotify(signal);
}
- const_cast<QObject*>(sender)->disconnectNotify(method.mobj ? signalSignature.constData() : 0);
return true;
}
@@ -2907,22 +2895,6 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
/*!
- \fn void QObject::connectNotify(const char *signal)
- \obsolete
-*/
-void QObject::connectNotify(const char *)
-{
-}
-
-/*!
- \fn void QObject::disconnectNotify(const char *signal)
- \obsolete
-*/
-void QObject::disconnectNotify(const char *)
-{
-}
-
-/*!
\since 5.0
This virtual function is called when something has been connected
@@ -4238,15 +4210,6 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa
Q_ASSERT(method.isValid());
s->connectNotify(method);
- // reconstruct the signature to call connectNotify
- const char *sig;
- QByteArray tmp_sig = method.methodSignature();
- sig = tmp_sig.constData();
- QVarLengthArray<char> signalSignature(qstrlen(sig) + 2);
- signalSignature.data()[0] = char(QSIGNAL_CODE + '0');
- strcpy(signalSignature.data() + 1 , sig);
- s->connectNotify(signalSignature.data());
-
return ret;
}
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 5e969d67f6..f69a4395f9 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -373,9 +373,6 @@ protected:
virtual void connectNotify(const QMetaMethod &signal);
virtual void disconnectNotify(const QMetaMethod &signal);
- // Deprecated; to be removed before Qt 5.0
- virtual void connectNotify(const char *signal);
- virtual void disconnectNotify(const char *signal);
protected:
QObject(QObjectPrivate &dd, QObject *parent = 0);