From 8007f6acb160659ae6cb022699999c5a92cbb4fa Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Feb 2024 10:31:34 +0100 Subject: [PATCH] tst_toolsupport: make the i386 case really about i386 Specifically, don't use it for either of the x86-64 ABIs (LP64 and ILP32). The generic case below should work for everyone. Fixes: QTBUG-122720 Change-Id: I01ec3c774d9943adb903fffd17b75fc79095e089 Reviewed-by: hjk Reviewed-by: Fabian Kosmale (cherry picked from commit 24245d2a85cbcd503816027067aa72995e3ac2ac) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/other/toolsupport/tst_toolsupport.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index 8ab7c19fba7..965b55977cc 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -38,6 +38,7 @@ template size_t pmm_to_offsetof(T K:: *pmm) { #ifdef Q_CC_MSVC + // Even on 64 bit MSVC uses 4 byte offsets. quint32 ret; #else @@ -114,10 +115,10 @@ void tst_toolsupport::offsets_data() QTestData &data = QTest::newRow("QFilePrivate::fileName") << pmm_to_offsetof(&QFilePrivate::fileName); // Please heed the comment at the top of this file when changing one of these lines: -#ifdef Q_PROCESSOR_X86 +#ifdef Q_PROCESSOR_X86_32 // x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in // qglobal.h for more details. - data << 264 << 424; + data << 264 << -1; #else data << 300 << 424; #endif