summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2012-02-25 20:48:56 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-28 12:36:40 +0100
commit0d9714f44549bf2e3a39d5c9833a4744cc3e6410 (patch)
treec6025119e6b912b36419292e770c7868e87a845f /tests/auto/corelib
parent457606d12b13025970af2e36c640bb1f1e8f89d6 (diff)
moc: Only generate IndexOfMethod for signals.
moc is currently generating code to convert from a pointer to member function of a slot or signal to its index. The idea was that it could be usefull for slots to have the new syntax do the same as the old one (connecting signal index to slot index). But in practice, the new syntax do not use the IndexOfMethod for slots. Also, it does not work for all the slots (no Q_PRIVATE_SLOT, no static slots) So since it is not used, and that it would take room in the binaries to generate all the code to get the index of slots, we remove it. If ever we need it, we can still add it later. Change-Id: Ia417e3e524d7915ca86433ea86c66ac2b299c81a Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 68ff8e4bb6..09fd0a7adb 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -326,6 +326,8 @@ public slots:
signals:
void sig0();
QString sig1(QString s1);
+ void sig10(QString s1, QString s2, QString s3, QString s4, QString s5, QString s6, QString s7,
+ QString s8, QString s9, QString s10);
protected:
QtTestObject(QVariant) {}
@@ -725,6 +727,7 @@ typedef QString CustomString;
class QtTestCustomObject: public QObject
{
Q_OBJECT
+ friend class tst_QMetaObject;
public:
QtTestCustomObject(): QObject(), sum(0) {}
@@ -1129,11 +1132,9 @@ void tst_QMetaObject::indexOfMethodPMF()
}
INDEXOFMETHODPMF_HELPER(tst_QMetaObject, value7Changed, (const QString&))
- INDEXOFMETHODPMF_HELPER(tst_QMetaObject, stdSet, ())
- INDEXOFMETHODPMF_HELPER(QtTestObject, sl10, (QString,QString,QString,QString,QString,QString,QString,QString,QString,QString))
INDEXOFMETHODPMF_HELPER(QtTestObject, sig0, ())
- INDEXOFMETHODPMF_HELPER(QtTestObject, testLongLong, (qint64, quint64))
- INDEXOFMETHODPMF_HELPER(QtTestObject, testReference, (QString&))
+ INDEXOFMETHODPMF_HELPER(QtTestObject, sig10, (QString,QString,QString,QString,QString,QString,QString,QString,QString,QString))
+ INDEXOFMETHODPMF_HELPER(QtTestCustomObject, sig_custom, (const CustomString &))
}
QTEST_MAIN(tst_QMetaObject)