forked from qt-creator/qt-creator
Debugger: Simplify 'short int' to 'short' in type displays
Change-Id: I63946a983c4dd47e31f26e5f70a4c3c9e31c92ea Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -117,6 +117,8 @@ QString simplifyType(const QString &typeIn)
|
|||||||
if (type.startsWith(QLatin1String("struct ")))
|
if (type.startsWith(QLatin1String("struct ")))
|
||||||
type.remove(0, 7);
|
type.remove(0, 7);
|
||||||
|
|
||||||
|
type.replace(QLatin1String("short int"), QLatin1String("short"));
|
||||||
|
|
||||||
const bool isLibCpp = type.contains(QLatin1String("std::__1"));
|
const bool isLibCpp = type.contains(QLatin1String("std::__1"));
|
||||||
type.replace(QLatin1String("std::__cxx11::"), QLatin1String("std::"));
|
type.replace(QLatin1String("std::__cxx11::"), QLatin1String("std::"));
|
||||||
type.replace(QLatin1String("std::__1::"), QLatin1String("std::"));
|
type.replace(QLatin1String("std::__1::"), QLatin1String("std::"));
|
||||||
|
@@ -33,6 +33,7 @@ using namespace Internal;
|
|||||||
|
|
||||||
const char *description[] =
|
const char *description[] =
|
||||||
{
|
{
|
||||||
|
"g++_short",
|
||||||
"g++_stdstring",
|
"g++_stdstring",
|
||||||
"g++_stdwstring",
|
"g++_stdwstring",
|
||||||
"g++_5stdstring",
|
"g++_5stdstring",
|
||||||
@@ -49,6 +50,7 @@ const char *description[] =
|
|||||||
"g++_unordered_multimap",
|
"g++_unordered_multimap",
|
||||||
"g++_stdvector_int_ptr",
|
"g++_stdvector_int_ptr",
|
||||||
"g++_stdmap_char_ptr",
|
"g++_stdmap_char_ptr",
|
||||||
|
"g++_stdmap_short_string",
|
||||||
|
|
||||||
"libc++_stringvector",
|
"libc++_stringvector",
|
||||||
"libc++_unordered_map",
|
"libc++_unordered_map",
|
||||||
@@ -72,6 +74,7 @@ const char *description[] =
|
|||||||
const char *input[] =
|
const char *input[] =
|
||||||
{
|
{
|
||||||
// g++
|
// g++
|
||||||
|
"short int",
|
||||||
"std::string",
|
"std::string",
|
||||||
"std::wstring",
|
"std::wstring",
|
||||||
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >",
|
"std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >",
|
||||||
@@ -90,6 +93,7 @@ const char *input[] =
|
|||||||
|
|
||||||
"std::vector<int *, std::allocator<int*> >",
|
"std::vector<int *, std::allocator<int*> >",
|
||||||
"std::map<const char *, Foo, std::less<const char *>, std::allocator<std::pair<char const* const, Foo> > >",
|
"std::map<const char *, Foo, std::less<const char *>, std::allocator<std::pair<char const* const, Foo> > >",
|
||||||
|
"std::map<short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<short>, std::allocator<std::pair<short int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >",
|
||||||
|
|
||||||
// libc++
|
// libc++
|
||||||
"std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >",
|
"std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >",
|
||||||
@@ -117,6 +121,7 @@ const char *input[] =
|
|||||||
const char *output[] =
|
const char *output[] =
|
||||||
{
|
{
|
||||||
// Gcc
|
// Gcc
|
||||||
|
"short",
|
||||||
"std::string",
|
"std::string",
|
||||||
"std::wstring",
|
"std::wstring",
|
||||||
"std::string",
|
"std::string",
|
||||||
@@ -133,6 +138,7 @@ const char *output[] =
|
|||||||
"std::unordered_multimap<int, int>",
|
"std::unordered_multimap<int, int>",
|
||||||
"std::vector<int *>",
|
"std::vector<int *>",
|
||||||
"std::map<const char *, Foo>",
|
"std::map<const char *, Foo>",
|
||||||
|
"std::map<short, std::string>",
|
||||||
// libc++
|
// libc++
|
||||||
"std::vector<std::string>",
|
"std::vector<std::string>",
|
||||||
"std::unordered_map<std::string, float>",
|
"std::unordered_map<std::string, float>",
|
||||||
|
Reference in New Issue
Block a user