aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2023-03-02 15:12:36 +0100
committerChristian Stenger <christian.stenger@qt.io>2023-03-06 07:11:05 +0000
commit5ea655cabdb9bb883636d4946e238ab78f909fa3 (patch)
tree7df21ebf3a24df38e28b794169bdd7a4d3b79b60 /share
parent735417c859b088855d6246e4d26adf68ddf248b1 (diff)
Dumper: Fix dumping QDir with Qt6.6
Change-Id: I7ef37026c638f7e77e4e34af40c3ecff1e40e8b3 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/qttypes.py39
1 files changed, 36 insertions, 3 deletions
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 2cdf900d78e..5a406c03190 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -418,7 +418,24 @@ def qdump__QDir(d, value):
d.putExpandable()
privAddress = d.extractPointer(value)
bit32 = d.ptrSize() == 4
- qt5 = d.qtVersion() >= 0x050000
+
+ # change fc3942114da adds FileCache
+ # QStringList nameFilters;
+ # QDir::SortFlags sort;
+ # QDir::Filters filters;
+ # std::unique_ptr<QAbstractFileEngine> fileEngine;
+ # QFileSystemEntry dirEntry;
+ # struct FileCache
+ # {
+ # QMutex mutex;
+ # QStringList files;
+ # QFileInfoList fileInfos;
+ # std::atomic<bool> fileListsInitialized = false;
+ # QFileSystemEntry absoluteDirEntry;
+ # QFileSystemMetaData metaData;
+ # };
+ # mutable FileCache fileCache;
+
# Change 9fc0965 reorders members again.
# bool fileListsInitialized
@@ -454,7 +471,9 @@ def qdump__QDir(d, value):
# + 2 byte padding
fileSystemEntrySize = 2 * d.ptrSize() + 8
- if d.qtVersion() >= 0x060000:
+ if d.qtVersion() >= 0x060600:
+ case = 3
+ elif d.qtVersion() >= 0x060000:
case = 2
elif d.qtVersion() >= 0x050300:
case = 1
@@ -467,7 +486,20 @@ def qdump__QDir(d, value):
firstValue = d.extractInt(privAddress + d.ptrSize())
case = 1 if firstValue == 0 or firstValue == 1 else 0
- if case == 2:
+ if case == 3:
+ if bit32:
+ dirEntryOffset = 24
+ fileCacheOffset = 52
+ filesOffset = fileCacheOffset + 4
+ fileInfosOffset = fileCacheOffset + 16
+ absoluteDirEntryOffset = fileCacheOffset + 32
+ else:
+ dirEntryOffset = 48
+ fileCacheOffset = 104
+ filesOffset = fileCacheOffset + 8
+ fileInfosOffset = fileCacheOffset + 32
+ absoluteDirEntryOffset = fileCacheOffset + 64
+ elif case == 2:
if bit32:
filesOffset = 4
fileInfosOffset = 16
@@ -507,6 +539,7 @@ def qdump__QDir(d, value):
d.call('int', value, 'count') # Fill cache.
except:
pass
+
#d.putCallItem('absolutePath', '@QString', value, 'absolutePath')
#d.putCallItem('canonicalPath', '@QString', value, 'canonicalPath')
with SubItem(d, 'absolutePath'):