forked from qt-creator/qt-creator
Debugger: Remove shortcut to get known type sizes in dumpers
This was incomplete, can conceptionally not be complete, and most of the sizes were wrong for Qt 6. Change-Id: Id107b30dd6707b280c18a5d2065a4ec9c39fb035 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3816,40 +3816,8 @@ class DumperBase():
|
|||||||
#typish.check()
|
#typish.check()
|
||||||
return typish
|
return typish
|
||||||
if isinstance(typish, str):
|
if isinstance(typish, str):
|
||||||
def knownSize(tn):
|
|
||||||
if tn[0] == 'Q':
|
|
||||||
if tn in ('QByteArray', 'QString', 'QList', 'QStringList',
|
|
||||||
'QStringDataPtr'):
|
|
||||||
return self.ptrSize()
|
|
||||||
if tn == 'QStandardItemData':
|
|
||||||
return 8 + 2 * self.ptrSize()
|
|
||||||
if tn in ('QImage', 'QObject'):
|
|
||||||
return 2 * self.ptrSize()
|
|
||||||
if tn == 'QVariant':
|
|
||||||
return 8 + self.ptrSize()
|
|
||||||
if typish in ('QPointF', 'QDateTime', 'QRect'):
|
|
||||||
return 16
|
|
||||||
if typish == 'QPoint':
|
|
||||||
return 8
|
|
||||||
if typish == 'Qt::ItemDataRole':
|
|
||||||
return 4
|
|
||||||
if typish == 'QChar':
|
|
||||||
return 2
|
|
||||||
if typish in ('quint32', 'qint32'):
|
|
||||||
return 4
|
|
||||||
return None
|
|
||||||
|
|
||||||
ns = self.qtNamespace()
|
ns = self.qtNamespace()
|
||||||
typish = typish.replace('@', ns)
|
typish = typish.replace('@', ns)
|
||||||
if typish.startswith(ns):
|
|
||||||
if size is None:
|
|
||||||
size = knownSize(typish[len(ns):])
|
|
||||||
else:
|
|
||||||
if size is None:
|
|
||||||
size = knownSize(typish)
|
|
||||||
if size is not None:
|
|
||||||
typish = ns + typish
|
|
||||||
|
|
||||||
tdata = self.typeData.get(typish, None)
|
tdata = self.typeData.get(typish, None)
|
||||||
if tdata is not None:
|
if tdata is not None:
|
||||||
return self.Type(self, typish)
|
return self.Type(self, typish)
|
||||||
|
Reference in New Issue
Block a user