diff --git a/src/plugins/debugger/simplifytype.cpp b/src/plugins/debugger/simplifytype.cpp index ae519d70d44..a23d819fa63 100644 --- a/src/plugins/debugger/simplifytype.cpp +++ b/src/plugins/debugger/simplifytype.cpp @@ -117,6 +117,8 @@ QString simplifyType(const QString &typeIn) if (type.startsWith(QLatin1String("struct "))) type.remove(0, 7); + type.replace(QLatin1String("short int"), QLatin1String("short")); + const bool isLibCpp = type.contains(QLatin1String("std::__1")); type.replace(QLatin1String("std::__cxx11::"), QLatin1String("std::")); type.replace(QLatin1String("std::__1::"), QLatin1String("std::")); diff --git a/tests/auto/debugger/tst_simplifytypes.cpp b/tests/auto/debugger/tst_simplifytypes.cpp index 2d5444d3869..47faf2405a3 100644 --- a/tests/auto/debugger/tst_simplifytypes.cpp +++ b/tests/auto/debugger/tst_simplifytypes.cpp @@ -33,6 +33,7 @@ using namespace Internal; const char *description[] = { + "g++_short", "g++_stdstring", "g++_stdwstring", "g++_5stdstring", @@ -49,6 +50,7 @@ const char *description[] = "g++_unordered_multimap", "g++_stdvector_int_ptr", "g++_stdmap_char_ptr", + "g++_stdmap_short_string", "libc++_stringvector", "libc++_unordered_map", @@ -72,6 +74,7 @@ const char *description[] = const char *input[] = { // g++ +"short int", "std::string", "std::wstring", "std::__cxx11::basic_string, std::allocator >", @@ -90,6 +93,7 @@ const char *input[] = "std::vector >", "std::map, std::allocator > >", +"std::map, std::allocator >, std::less, std::allocator, std::allocator > > > >", // libc++ "std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >", @@ -117,6 +121,7 @@ const char *input[] = const char *output[] = { // Gcc + "short", "std::string", "std::wstring", "std::string", @@ -133,6 +138,7 @@ const char *output[] = "std::unordered_multimap", "std::vector", "std::map", + "std::map", // libc++ "std::vector", "std::unordered_map",