diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-25 19:05:35 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-26 11:25:13 (GMT) |
commit | df0e6759e8ebc1053f951d3a5398a41156e91913 (patch) | |
tree | 18396f0e4763f37ada5acc3b6f60fd151d26fbaf /tests/auto/moc | |
parent | e7eb7bdf63791ed03257f2f23b1f515e4d89e054 (diff) | |
download | Qt-df0e6759e8ebc1053f951d3a5398a41156e91913.zip Qt-df0e6759e8ebc1053f951d3a5398a41156e91913.tar.gz Qt-df0e6759e8ebc1053f951d3a5398a41156e91913.tar.bz2 |
QMetaObject::normalizeType: fix uses of const and template.
'const' was not removed from templated class
This even fixes compilation errors if using const return templated types
We can change the normalized signature in Qt 4.7 as it has already changed
and we have code to check that if moc revision < 5 it will
renormalize all the symbols
cf commit b881d8fb99972f1bd04ab4c84843cc8d43ddbeed
Task-number: QTBUG-7421
Reviewed-by: Brad
Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/moc')
-rw-r--r-- | tests/auto/moc/tst_moc.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index 30c2721..8890a15 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -1302,6 +1302,17 @@ void tst_Moc::QTBUG5590_dummyProperty() QCOMPARE(o.value2(), 82); } +class QTBUG7421_ReturnConstTemplate: public QObject +{ Q_OBJECT +public slots: + const QList<int> returnConstTemplate1() { return QList<int>(); } + QList<int> const returnConstTemplate2() { return QList<int>(); } + const int returnConstInt() { return 0; } + const QString returnConstString(const QString s) { return s; } + QString const returnConstString2( QString const s) { return s; } +}; + + QTEST_APPLESS_MAIN(tst_Moc) #include "tst_moc.moc" |