Debugger: fix some qtVersionAtLeast checks

Change-Id: I681927fe5e086738f7635f7e578238c448dca2a2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2024-06-17 14:33:08 +02:00
parent d30dda07a1
commit d22a95bc54

View File

@@ -385,9 +385,9 @@ def qdump__QDateTime(d, value):
# - [QTime time;] # - [QTime time;]
# - - uint mds; # - - uint mds;
# - Spec spec; # - Spec spec;
dateSize = 8 if qtVersionAtLeast(0x050000) else 4 # Qt5: qint64, Qt4 uint dateSize = 8 if d.qtVersionAtLeast(0x050000) else 4 # Qt5: qint64, Qt4 uint
# 4 byte padding after 4 byte QAtomicInt if we are on 64 bit and QDate is 64 bit # 4 byte padding after 4 byte QAtomicInt if we are on 64 bit and QDate is 64 bit
refPlusPadding = 8 if qtVersionAtLeast(0x050000) and d.ptrSize() == 8 else 4 refPlusPadding = 8 if d.qtVersionAtLeast(0x050000) and d.ptrSize() == 8 else 4
dateBase = base + refPlusPadding dateBase = base + refPlusPadding
timeBase = dateBase + dateSize timeBase = dateBase + dateSize
mds = d.extractInt(timeBase) mds = d.extractInt(timeBase)
@@ -1031,14 +1031,14 @@ def qdump__QHostAddress(d, value):
else: else:
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \ (ipString, scopeId, a4, pad, a6, protocol, isParsed) \
= d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd) = d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd)
elif qtVersionAtLeast(0x050600): # 5.6.0 at f3aabb42 elif d.qtVersionAtLeast(0x050600): # 5.6.0 at f3aabb42
if d.ptrSize() == 8 or d.isWindowsTarget(): if d.ptrSize() == 8 or d.isWindowsTarget():
(ipString, scopeId, a4, pad, a6, protocol, isParsed) \ (ipString, scopeId, a4, pad, a6, protocol, isParsed) \
= d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd) = d.split('{@QString}{@QString}{@quint32}I16sI{bool}', dd)
else: else:
(ipString, scopeId, a4, a6, protocol, isParsed) \ (ipString, scopeId, a4, a6, protocol, isParsed) \
= d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd) = d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd)
elif qtVersionAtLeast(0x050000): # 5.2.0 at 62feb088 elif d.qtVersionAtLeast(0x050000): # 5.2.0 at 62feb088
(ipString, scopeId, a4, a6, protocol, isParsed) \ (ipString, scopeId, a4, a6, protocol, isParsed) \
= d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd) = d.split('{@QString}{@QString}{@quint32}16sI{bool}', dd)
else: # 4.8.7 at b05d05f else: # 4.8.7 at b05d05f