diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2019-12-11 18:13:28 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2020-02-20 16:11:02 +0100 |
commit | 4dbac23e5354638224d8d99ba3342067c015a04b (patch) | |
tree | ac262e76f0e6b04378fb653192b216a6f8d1ef68 /tests | |
parent | 33cd680ddbaccf6139e215d851a39e657ae36394 (diff) |
Normalize types at compile time
This also fix the normalization algorithm:
- Some 'const' after pointers were not removed as they should.
- No need to keep the space in '> >' and '< :' in C++11 anymore
- Fix normalization of 'long unsigned int' and similar
Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
10 files changed, 113 insertions, 25 deletions
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp index c83e7af503..bcd4a66782 100644 --- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp @@ -1332,7 +1332,7 @@ void tst_QMetaObject::normalizedSignature_data() QTest::newRow("const ref") << "const QString &foo()" << "const QString&foo()"; QTest::newRow("reference") << "QString &foo()" << "QString&foo()"; QTest::newRow("const1") << "void foo(QString const *)" << "void foo(const QString*)"; - QTest::newRow("const2") << "void foo(QString * const)" << "void foo(QString*const)"; + QTest::newRow("const2") << "void foo(QString * const)" << "void foo(QString*)"; QTest::newRow("const3") << "void foo(QString const &)" << "void foo(QString)"; QTest::newRow("const4") << "void foo(const int)" << "void foo(int)"; QTest::newRow("const5") << "void foo(const int, int const, const int &, int const &)" @@ -1342,11 +1342,16 @@ void tst_QMetaObject::normalizedSignature_data() QTest::newRow("const8") << "void foo(QVector<int const*>)" << "void foo(QVector<const int*>)"; QTest::newRow("const9") << "void foo(const Foo<Bar>)" << "void foo(Foo<Bar>)"; QTest::newRow("const10") << "void foo(Foo<Bar>const)" << "void foo(Foo<Bar>)"; - QTest::newRow("const11") << "void foo(Foo<Bar> *const)" << "void foo(Foo<Bar>*const)"; - QTest::newRow("const12") << "void foo(Foo<Bar>const*const *const)" << "void foo(Foo<Bar>*const*const)"; + QTest::newRow("const11") << "void foo(Foo<Bar> *const)" << "void foo(Foo<Bar>*)"; + QTest::newRow("const12") << "void foo(Foo<Bar>const*const *const)" << "void foo(const Foo<Bar>*const*)"; QTest::newRow("const13") << "void foo(const Foo<Bar>&)" << "void foo(Foo<Bar>)"; QTest::newRow("const14") << "void foo(Foo<Bar>const&)" << "void foo(Foo<Bar>)"; QTest::newRow("QList") << "void foo(QList<int>)" << "void foo(QVector<int>)"; + QTest::newRow("QList1") << "void foo(const Template<QList, MyQList const>)" + << "void foo(Template<QVector,const MyQList>)"; + + QTest::newRow("refref") << "const char* foo(const X &&,X const &&, const X* &&) && " + << "const char*foo(const X&&,const X&&,const X*&&)&&"; QTest::newRow("invalid1") << "a( b" << "a(b"; } @@ -1372,23 +1377,59 @@ void tst_QMetaObject::normalizedType_data() QTest::newRow("template2") << "QVector<const int *>" << "QVector<const int*>"; QTest::newRow("template3") << "QMap<QString, int>" << "QMap<QString,int>"; QTest::newRow("template4") << "const QMap<QString, int> &" << "QMap<QString,int>"; - QTest::newRow("template5") << "QVector< ::Foo::Bar>" << "QVector< ::Foo::Bar>"; + QTest::newRow("template5") << "QVector< ::Foo::Bar>" << "QVector<::Foo::Bar>"; QTest::newRow("template6") << "QVector<::Foo::Bar>" << "QVector<::Foo::Bar>"; - QTest::newRow("template7") << "QVector<QVector<int> >" << "QVector<QVector<int> >"; + QTest::newRow("template7") << "QVector<QVector<int> >" << "QVector<QVector<int>>"; QTest::newRow("template8") << "QMap<const int, const short*>" << "QMap<const int,const short*>"; - QTest::newRow("template9") << "QPair<const QPair<int, int const *> , QPair<QHash<int, const char*> > >" << "QPair<const QPair<int,const int*>,QPair<QHash<int,const char*> > >"; + QTest::newRow("template9") << "QPair<const QPair<int, int const *> , QPair<QHash<int, const char*> > >" << "QPair<const QPair<int,const int*>,QPair<QHash<int,const char*>>>"; + QTest::newRow("template10") << "QList<int const * const> const" << "QVector<const int*const>"; + QTest::newRow("template11") << " QSharedPointer<QVarLengthArray< QString const, ( 16>> 2 )> > const & " + << "QSharedPointer<QVarLengthArray<const QString,(16>>2)>>"; + QTest::newRow("template_sub") << "X<( Y < 8), (Y >6)> const & " << "X<(Y<8),(Y>6)>"; QTest::newRow("value1") << "const QString &" << "QString"; QTest::newRow("value2") << "QString const &" << "QString"; QTest::newRow("constInName1") << "constconst" << "constconst"; QTest::newRow("constInName2") << "constconst*" << "constconst*"; QTest::newRow("constInName3") << "const constconst&" << "constconst"; - QTest::newRow("constInName4") << "constconst const*const" << "constconst*const"; + QTest::newRow("constInName4") << "constconst const*const" << "const constconst*"; QTest::newRow("class") << "const class foo&" << "foo"; QTest::newRow("struct") << "const struct foo*" << "const foo*"; QTest::newRow("struct2") << "struct foo const*" << "const foo*"; QTest::newRow("enum") << "enum foo" << "foo"; QTest::newRow("void") << "void" << "void"; QTest::newRow("QList") << "QList<int>" << "QVector<int>"; + QTest::newRow("refref") << "X const*const&&" << "const X*const&&"; + QTest::newRow("refref2") << "const X<T const&&>&&" << "const X<const T&&>&&"; + QTest::newRow("long1") << "long unsigned int long" << "unsigned long long"; + QTest::newRow("long2") << "int signed long" << "long"; + QTest::newRow("long3") << "long unsigned" << "ulong"; + QTest::newRow("long double") << " long double" << "long double"; + QTest::newRow("signed char") << "char signed" << "signed char"; + QTest::newRow("unsigned char") << "char unsigned" << "unsigned char"; + QTest::newRow("signed short") << "short signed" << "short"; + QTest::newRow("unsigned shot") << "short unsigned" << "unsigned short"; + QTest::newRow("unsigned shot") << "short unsigned" << "unsigned short"; + QTest::newRow("array1") << "unsigned int [4]" << "uint[4]"; + QTest::newRow("array2") << "unsigned int const [4][5]" << "const uint[4][5]"; + QTest::newRow("array3") << "unsigned[] const" << "uint[]"; + QTest::newRow("nttp1") << "S<'>', int const> const" + << "S<'>',const int>"; + QTest::newRow("nttp2") << "S< \"> \\\">const * \\\\\" , int const> const" + << "S<\"> \\\">const * \\\\\",const int>"; + QTest::newRow("nttp3") << "S<\"Q <\" , int const> const*" + << "const S<\"Q <\",const int>*"; + QTest::newRow("nttp4") << "S< 1'2 , int const> const" + << "S<1'2,const int>"; + QTest::newRow("invalid") << "'const" + << "'const"; + QTest::newRow("anonym1") << "XX::<unnamed struct>" + << "XX::<unnamed struct>"; + QTest::newRow("anonym2") << "XX::{unnamed type#1}" + << "XX::{unnamed type#1}"; + QTest::newRow("anonym3") << "struct XX::<unnamed-type-s>" + << "XX::<unnamed-type-s>"; + QTest::newRow("anonym4") << "XX::(anonymous struct at ./example.cpp:10:13)" + << "XX::(anonymous struct at./example.cpp:10:13)"; } void tst_QMetaObject::normalizedType() @@ -1397,6 +1438,7 @@ void tst_QMetaObject::normalizedType() QFETCH(QString, result); QCOMPARE(QMetaObject::normalizedType(type.toLatin1()), result.toLatin1()); + QCOMPARE(QMetaObject::normalizedType(result.toLatin1()), result.toLatin1()); } void tst_QMetaObject::customPropertyType() diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index 04c4777e07..0d9dfc1c4c 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -124,6 +124,8 @@ private slots: void customDebugStream(); void unknownType(); void fromType(); + void operatorEq_data(); + void operatorEq(); }; struct BaseGenericType @@ -579,11 +581,11 @@ void tst_QMetaType::typeName_data() // automatic registration QTest::newRow("QHash<int,int>") << ::qMetaTypeId<QHash<int, int> >() << QString::fromLatin1("QHash<int,int>"); QTest::newRow("QMap<int,int>") << ::qMetaTypeId<QMap<int, int> >() << QString::fromLatin1("QMap<int,int>"); - QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QVector<QMap<int,int> >"); + QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QVector<QMap<int,int>>"); // automatic registration with automatic QList to QVector aliasing QTest::newRow("QList<int>") << ::qMetaTypeId<QList<int> >() << QString::fromLatin1("QVector<int>"); - QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QVector<QVector<int> >"); + QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QVector<QVector<int>>"); QTest::newRow("CustomQObject*") << ::qMetaTypeId<CustomQObject*>() << QString::fromLatin1("CustomQObject*"); QTest::newRow("CustomGadget") << ::qMetaTypeId<CustomGadget>() << QString::fromLatin1("CustomGadget"); @@ -1745,7 +1747,7 @@ void tst_QMetaType::automaticTemplateRegistration() PRINT_2ARG_TEMPLATE ) - CREATE_AND_VERIFY_CONTAINER(QList, QList<QMap<int, QHash<char, QVariantList> > >) + CREATE_AND_VERIFY_CONTAINER(QList, QList<QMap<int, QHash<char, QList<QVariant> > > >) CREATE_AND_VERIFY_CONTAINER(QVector, void*) CREATE_AND_VERIFY_CONTAINER(QVector, const void*) CREATE_AND_VERIFY_CONTAINER(QList, void*) @@ -2527,6 +2529,50 @@ void tst_QMetaType::fromType() #undef FROMTYPE_CHECK } +template<char X, typename T = void> +struct CharTemplate +{ + struct + { + int a; + } x; +}; + +void tst_QMetaType::operatorEq_data() +{ + QTest::addColumn<QMetaType>("typeA"); + QTest::addColumn<QMetaType>("typeB"); + QTest::addColumn<bool>("eq"); + + QTest::newRow("String") << QMetaType(QMetaType::QString) + << QMetaType::fromType<const QString &>() << true; + QTest::newRow("void1") << QMetaType(QMetaType::UnknownType) << QMetaType::fromType<void>() + << true; + QTest::newRow("void2") << QMetaType::fromType<const void>() << QMetaType::fromType<void>() + << true; + QTest::newRow("vec1") << QMetaType::fromType<QVector<const int *>>() + << QMetaType::fromType<QVector<const int *>>() << true; + QTest::newRow("vec2") << QMetaType::fromType<QVector<const int *>>() + << QMetaType::fromType<QVector<int *>>() << false; + QTest::newRow("char1") << QMetaType::fromType<CharTemplate<'>'>>() + << QMetaType::fromType<CharTemplate<'>', void>>() << true; + QTest::newRow("annon1") << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>() + << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>() << true; + QTest::newRow("annon2") << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>() + << QMetaType::fromType<decltype(CharTemplate<'<'>::x)>() << false; +} + +void tst_QMetaType::operatorEq() +{ + QFETCH(QMetaType, typeA); + QFETCH(QMetaType, typeB); + QFETCH(bool, eq); + + QCOMPARE(typeA == typeB, eq); + QCOMPARE(typeB == typeA, eq); + QCOMPARE(typeA != typeB, !eq); + QCOMPARE(typeB != typeA, !eq); +} // Compile-time test, it should be possible to register function pointer types class Undefined; diff --git a/tests/auto/testlib/selftests/expected_signaldumper.junitxml b/tests/auto/testlib/selftests/expected_signaldumper.junitxml index 6609f518a2..0c03988879 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.junitxml +++ b/tests/auto/testlib/selftests/expected_signaldumper.junitxml @@ -147,7 +147,7 @@ <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)" type="info" --> <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())" type="info" --> <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)" type="info" --> - <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()" type="info" --> + <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)" type="info" --> <!-- message="Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())" type="info" --> <!-- message="Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())" type="info" --> </testcase> @@ -279,7 +279,7 @@ <![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)]]> <![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())]]> <![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]> -<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]> +<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]> <![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]> <![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]> <![CDATA[Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()]]> diff --git a/tests/auto/testlib/selftests/expected_signaldumper.lightxml b/tests/auto/testlib/selftests/expected_signaldumper.lightxml index 8ce57e4b84..d29319841c 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.lightxml +++ b/tests/auto/testlib/selftests/expected_signaldumper.lightxml @@ -557,7 +557,7 @@ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]></Description> </Message> <Message type="info" file="" line="0"> - <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]></Description> + <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]></Description> </Message> <Message type="info" file="" line="0"> <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]></Description> diff --git a/tests/auto/testlib/selftests/expected_signaldumper.tap b/tests/auto/testlib/selftests/expected_signaldumper.tap index 39419280d4..bbaaa025c3 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.tap +++ b/tests/auto/testlib/selftests/expected_signaldumper.tap @@ -139,7 +139,7 @@ ok 18 - slotEmittingSignalOldSyntax(queued) # Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_) # Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>()) # Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_) -# Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal () +# Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_) # Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) # Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) ok 19 - variousTypes() diff --git a/tests/auto/testlib/selftests/expected_signaldumper.teamcity b/tests/auto/testlib/selftests/expected_signaldumper.teamcity index 15bb4ddfe1..dee5aa70ef 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.teamcity +++ b/tests/auto/testlib/selftests/expected_signaldumper.teamcity @@ -54,7 +54,7 @@ ##teamcity[testStdOut name='slotEmittingSignalOldSyntax(queued)' out='INFO: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()|nINFO: Signal: QEventDispatcherPlatform(_POINTER_) awake ()|nINFO: Signal: SignalSlotClass(_POINTER_) nestedSignal ()' flowId='tst_Signaldumper'] ##teamcity[testFinished name='slotEmittingSignalOldSyntax(queued)' flowId='tst_Signaldumper'] ##teamcity[testStarted name='variousTypes()' flowId='tst_Signaldumper'] -##teamcity[testStdOut name='variousTypes()' out='INFO: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))|nINFO: Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())' flowId='tst_Signaldumper'] +##teamcity[testStdOut name='variousTypes()' out='INFO: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))|nINFO: Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())' flowId='tst_Signaldumper'] ##teamcity[testFinished name='variousTypes()' flowId='tst_Signaldumper'] ##teamcity[testStarted name='deletingSender()' flowId='tst_Signaldumper'] ##teamcity[testStdOut name='deletingSender()' out='INFO: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()' flowId='tst_Signaldumper'] diff --git a/tests/auto/testlib/selftests/expected_signaldumper.txt b/tests/auto/testlib/selftests/expected_signaldumper.txt index 92d609d14c..86d817cd5f 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.txt +++ b/tests/auto/testlib/selftests/expected_signaldumper.txt @@ -139,7 +139,7 @@ INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVe INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_) INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>()) INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_) -INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal () +INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_) INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant()) PASS : tst_Signaldumper::variousTypes() diff --git a/tests/auto/testlib/selftests/expected_signaldumper.xml b/tests/auto/testlib/selftests/expected_signaldumper.xml index 01b0471268..c61832ec4a 100644 --- a/tests/auto/testlib/selftests/expected_signaldumper.xml +++ b/tests/auto/testlib/selftests/expected_signaldumper.xml @@ -559,7 +559,7 @@ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]></Description> </Message> <Message type="info" file="" line="0"> - <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]></Description> + <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]></Description> </Message> <Message type="info" file="" line="0"> <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]></Description> diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json index 0ce464a709..4f57fad5a8 100644 --- a/tests/auto/tools/moc/allmocs_baseline_in.json +++ b/tests/auto/tools/moc/allmocs_baseline_in.json @@ -1305,7 +1305,7 @@ "type": "int" }, { - "type": "QObject*const" + "type": "QObject*" } ], "name": "slot", @@ -2586,7 +2586,7 @@ "access": "public", "arguments": [ { - "type": "QVector<QVector<int> >" + "type": "QVector<QVector<int>>" } ], "name": "foo", @@ -2596,7 +2596,7 @@ "access": "public", "arguments": [ { - "type": "QVector<QVector<int> >" + "type": "QVector<QVector<int>>" } ], "name": "foo2", @@ -2606,7 +2606,7 @@ "access": "public", "arguments": [ { - "type": "QVector< ::AAA::BaseA*>" + "type": "QVector<::AAA::BaseA*>" } ], "name": "bar", @@ -2616,7 +2616,7 @@ "access": "public", "arguments": [ { - "type": "QVector< ::AAA::BaseA*>" + "type": "QVector<::AAA::BaseA*>" } ], "name": "bar2", @@ -2626,7 +2626,7 @@ "access": "public", "arguments": [ { - "type": "QVector<const ::AAA::BaseA*>" + "type": "QVector<const ::AAA::BaseA*>" } ], "name": "bar3", diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index be86fc8e21..08c604e37e 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -1827,8 +1827,8 @@ void tst_Moc::QTBUG12260_defaultTemplate() { QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomething(QHash<QString,QVariant>)") != -1); QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1); - QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)> >)") != -1); - QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QVector<QList<QString> >,QHash<int,QVector<QString> >)") != -1); + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)>>)") != -1); + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QVector<QList<QString>>,QHash<int,QVector<QString>>)") != -1); } void tst_Moc::notifyError() |