From 467a08127dc1ed2334d5512825ae61ffc467982c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 1 Aug 2012 16:22:49 +0200 Subject: [PATCH] CDB: Output std::wstring with compiler option -Zc:wchar_t-. std::wstring is then based on wchar_t instead of ushort. Change-Id: I4dd3ef29069b8375e7003deba3162537a0d01784 Reviewed-by: hjk --- src/libs/qtcreatorcdbext/symbolgroupvalue.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index b2ce3d39c70..3ed32b64219 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -928,6 +928,8 @@ static inline void formatMilliSeconds(std::wostream &str, int milliSecs) static const char stdStringTypeC[] = "std::basic_string,std::allocator >"; static const char stdWStringTypeC[] = "std::basic_string,std::allocator >"; +// Compiler option: -Zc:wchar_t-: +static const char stdWStringWCharTypeC[] = "std::basic_string,std::allocator >"; static KnownType knownPODTypeHelper(const std::string &type, std::string::size_type endPos) { @@ -1028,7 +1030,8 @@ static KnownType knownClassTypeHelper(const std::string &type, // STL strings if (!type.compare(pos, endPos - pos, stdStringTypeC)) return KT_StdString; - if (!type.compare(pos, endPos - pos, stdWStringTypeC)) + if (!type.compare(pos, endPos - pos, stdWStringTypeC) + || !type.compare(pos, endPos - pos, stdWStringWCharTypeC)) return KT_StdWString; return KT_Unknown; } // std::sth