summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-30 22:16:25 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-14 21:37:39 +0200
commitfa93f1aeb0dd92acf0cbe2113425a1b21b8c82cb (patch)
tree1fc5cfa364da27f46911f84183d1161d278708fa /tests/auto/tools
parent0599255fcf54086ae345d289e8f761d890a91a39 (diff)
Fix compile time type normalization code
Use a simpler constexpr to generate type name on gcc This works around an ICE on gcc in release mode when compiling with PCH enabled. As the type we're getting from Q_FUNC_INFO is already in a somewhat normalized form, this requires significanlty less processing and esp. not a recursive constexpr method which I suspect triggers the ICE. Fix integer type conversions to also properly normalize long long values (to q(u)longlong. Make sure the mapping also works on MSVC, where long long types get mapped to __int64. Also, normalize unsigned short and unsigned char to ushort and uchar, respectively, to follow the convention set by uint and ulong. Add some test cases to verify the mappings. Change-Id: I3dec5764450bf22ab6f066597803c3f46c2cd5ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index d3af266e74..d6eb76feb7 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -872,7 +872,9 @@ void tst_Moc::uLongLong()
QVERIFY(idx != -1);
idx = mobj->indexOfSlot("slotWithULongLong(unsigned long long)");
QVERIFY(idx != -1);
- idx = mobj->indexOfSlot("slotWithULongLongP(unsigned long long*)");
+ idx = mobj->indexOfSlot("slotWithULongLong(qulonglong)");
+ QVERIFY(idx != -1);
+ idx = mobj->indexOfSlot("slotWithULongLongP(qulonglong*)");
QVERIFY(idx != -1);
idx = mobj->indexOfSlot("slotWithLong(long)");