From fe8110ed6f2b15094f7d09d887d887c9c2e84e46 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 8 Nov 2013 13:06:25 +0100 Subject: [PATCH] CdbExt: Workaround GetTypeSize issue... ... for QString and QByteArray. Task-number: QTCREATORBUG-10679 Change-Id: Id07cad2715560f772374c1b4bcf3291338908f30 Reviewed-by: Friedemann Kleint --- src/libs/qtcreatorcdbext/symbolgroupvalue.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index ae433ac0c1f..8db5a833bfc 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -1628,9 +1628,11 @@ static unsigned qSharedDataSize(const SymbolGroupValueContext &ctx) } /* Return the size of a QString */ -static unsigned qStringSize(const SymbolGroupValueContext &ctx) +static unsigned qStringSize(const SymbolGroupValueContext &/*ctx*/) { - static const unsigned size = SymbolGroupValue::sizeOf(QtInfo::get(ctx).prependQtCoreModule("QString").c_str()); +// static const unsigned size = SymbolGroupValue::sizeOf(QtInfo::get(ctx).prependQtCoreModule("QString").c_str()); +// FIXME: Workaround the issue that GetTypeSize returns strange values; + static const unsigned size = SymbolGroupValue::pointerSize(); return size; } @@ -1642,9 +1644,11 @@ static unsigned qListSize(const SymbolGroupValueContext &ctx) } /* Return the size of a QByteArray */ -static unsigned qByteArraySize(const SymbolGroupValueContext &ctx) +static unsigned qByteArraySize(const SymbolGroupValueContext &/*ctx*/) { - static const unsigned size = SymbolGroupValue::sizeOf(QtInfo::get(ctx).prependQtCoreModule("QByteArray").c_str()); +// static const unsigned size = SymbolGroupValue::sizeOf(QtInfo::get(ctx).prependQtCoreModule("QByteArray").c_str()); +// FIXME: Workaround the issue that GetTypeSize returns strange values; + static const unsigned size = SymbolGroupValue::pointerSize(); return size; }