summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-02-26 10:31:34 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-06 10:28:03 +0000
commit8007f6acb160659ae6cb022699999c5a92cbb4fa (patch)
tree77db5debda331c9fbbab7d52f3d45908ce6abfc6
parentaeb51edf3399cb65e11232753e81548b64e54353 (diff)
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 <hjk@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 24245d2a85cbcd503816027067aa72995e3ac2ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp
index 8ab7c19fba..965b55977c 100644
--- a/tests/auto/other/toolsupport/tst_toolsupport.cpp
+++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp
@@ -38,6 +38,7 @@ template <typename T, typename K>
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