aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-03-02 13:03:47 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-03-06 07:10:46 +0000
commit735417c859b088855d6246e4d26adf68ddf248b1 (patch)
tree3d350945c02daa56bad0a635003a39d1454f77a1
parent6a41e3390869c41f316b336adfaa12f35171daf3 (diff)
Tests: Enhance offset test
Change-Id: I58bc51c4552ab58e303de0fdf3f89cd28b9ff62a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--tests/auto/debugger/tst_offsets.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_offsets.cpp b/tests/auto/debugger/tst_offsets.cpp
index cf428aafe8..2745c1da24 100644
--- a/tests/auto/debugger/tst_offsets.cpp
+++ b/tests/auto/debugger/tst_offsets.cpp
@@ -19,6 +19,7 @@
#include <QLibraryInfo>
#include <private/qdatetime_p.h>
+#include <private/qdir_p.h>
#include <private/qfile_p.h>
#include <private/qfileinfo_p.h>
#include <private/qobject_p.h>
@@ -52,6 +53,23 @@ OFFSET_ACCESS(QString, QFileSystemEntry, m_filePath);
OFFSET_ACCESS(QFileSystemEntry, QFileInfoPrivate, fileEntry);
OFFSET_ACCESS(QObjectPrivate::ExtraData*, QObjectPrivate, extraData);
+#if QT_VERSION >= 0x60000
+OFFSET_ACCESS(QFileSystemEntry, QDirPrivate, dirEntry);
+
+#if QT_VERSION < 0x60600
+OFFSET_ACCESS(QStringList, QDirPrivate, files);
+OFFSET_ACCESS(QFileInfoList, QDirPrivate, fileInfos);
+OFFSET_ACCESS(QFileSystemEntry, QDirPrivate, absoluteDirEntry);
+#else
+using FileCache = QDirPrivate::FileCache;
+
+OFFSET_ACCESS(QDirPrivate::FileCache, QDirPrivate, fileCache);
+OFFSET_ACCESS(QStringList, FileCache, files);
+OFFSET_ACCESS(QFileInfoList, FileCache, fileInfos);
+OFFSET_ACCESS(QFileSystemEntry, FileCache, absoluteDirEntry);
+#endif
+#endif
+
#if QT_VERSION < 0x50000
OFFSET_ACCESS(QString, QObjectPrivate, objectName);
#endif
@@ -290,6 +308,21 @@ void tst_offsets::offsets_data()
OFFSET_TEST(QDateTimePrivate, m_timeZone) << 20 << 24;
#endif
+#if QT_VERSION >= 0x60000
+#if QT_VERSION < 0x60600
+ OFFSET_TEST(QDirPrivate, dirEntry) << 40 << 96;
+ OFFSET_TEST(QDirPrivate, files) << 4 << 8;
+ OFFSET_TEST(QDirPrivate, fileInfos) << 16 << 32;
+ OFFSET_TEST(QDirPrivate, absoluteDirEntry) << 72 << 152;
+#else
+ OFFSET_TEST(QDirPrivate, fileCache) << 52 << 104;
+ OFFSET_TEST(QDirPrivate, dirEntry) << 24 << 48;
+ OFFSET_TEST(FileCache, files) << 4 << 8;
+ OFFSET_TEST(FileCache, fileInfos) << 16 << 32;
+ OFFSET_TEST(FileCache, absoluteDirEntry) << 32 << 64;
+#endif
+#endif
+
#ifdef HAS_BOOST
OFFSET_TEST(Uset, table_) << 0 << 0;
OFFSET_TEST(UsetTable, size_) << 8 << 16;