debugger: display references in type columns

This breaks tradition.

Change-Id: I6780f31d584021490293a1ed3a96b5c3608a8a36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-05-07 15:04:06 +02:00
committed by hjk
parent b1fd62e04b
commit 7dc71bc43c
3 changed files with 10 additions and 10 deletions

View File

@@ -1422,6 +1422,7 @@ class Dumper:
# generic pointer." with MinGW's gcc 4.5 when it "identifies" # generic pointer." with MinGW's gcc 4.5 when it "identifies"
# a "QWidget &" as "void &" and with optimized out code. # a "QWidget &" as "void &" and with optimized out code.
self.putItem(value.cast(type.target().unqualified())) self.putItem(value.cast(type.target().unqualified()))
self.putBetterType(typeName)
return return
except RuntimeError: except RuntimeError:
self.putValue("<optimized out reference>") self.putValue("<optimized out reference>")

View File

@@ -260,8 +260,6 @@ void WatchData::setType(const QByteArray &str, bool guessChildrenFromType)
type.chop(5); type.chop(5);
else if (type.endsWith(' ')) else if (type.endsWith(' '))
type.chop(1); type.chop(1);
else if (type.endsWith('&'))
type.chop(1);
else if (type.startsWith("const ")) else if (type.startsWith("const "))
type = type.mid(6); type = type.mid(6);
else if (type.startsWith("volatile ")) else if (type.startsWith("volatile "))

View File

@@ -2118,7 +2118,8 @@ namespace final {
// CheckType p int. // CheckType p int.
// Check p 21 int. // Check p 21 int.
// Check q 0x0 int *. // Check q 0x0 int *.
// Check qq <null reference> int. // Check pp 21 int &.
// Check qq <null reference> int &.
// Continue. // Continue.
return; // Uncomment. return; // Uncomment.
testNullReferenceHelper(pp, qq); testNullReferenceHelper(pp, qq);
@@ -4751,7 +4752,7 @@ namespace basic {
const Ref d = a; const Ref d = a;
BREAK_HERE; BREAK_HERE;
// Check a 43 int. // Check a 43 int.
// Check b 43 int. // Check b 43 int &.
// Check c 44 int. // Check c 44 int.
// Check d 43 basic::Ref. // Check d 43 basic::Ref.
// Continue. // Continue.
@@ -4767,7 +4768,7 @@ namespace basic {
const Ref d = a; const Ref d = a;
BREAK_HERE; BREAK_HERE;
// Check a "hello" QString. // Check a "hello" QString.
// Check b "bababa" QString. // Check b "bababa" QString &.
// Check c "world" QString. // Check c "world" QString.
// Check d "hello" basic::Ref. // Check d "hello" basic::Ref.
// Continue. // Continue.
@@ -4780,8 +4781,8 @@ namespace basic {
typedef QString &Ref; typedef QString &Ref;
const Ref d = const_cast<Ref>(a); const Ref d = const_cast<Ref>(a);
BREAK_HERE; BREAK_HERE;
// Check a "hello" QString. // Check a "hello" QString &.
// Check b "hello" QString. // Check b "hello" QString &.
// Check d "hello" basic::Ref. // Check d "hello" basic::Ref.
// Continue. // Continue.
dummyStatement(&a, &b, &d); dummyStatement(&a, &b, &d);
@@ -4859,13 +4860,13 @@ namespace basic {
{ {
BREAK_HERE; BREAK_HERE;
// Expand f. // Expand f.
// CheckType f Foo. // CheckType f Foo &.
// Check f.a 12 int. // Check f.a 12 int.
// Continue. // Continue.
++f.a; ++f.a;
BREAK_HERE; BREAK_HERE;
// Expand f. // Expand f.
// CheckType f Foo. // CheckType f Foo &.
// Check f.a 13 int. // Check f.a 13 int.
// Continue. // Continue.
} }
@@ -5720,7 +5721,7 @@ namespace bug5184 {
BREAK_HERE; BREAK_HERE;
// Check raw <0 items> QList<QByteArray>. // Check raw <0 items> QList<QByteArray>.
// CheckType request QNetworkRequest. // CheckType request QNetworkRequest.
// Check url "http://127.0.0.1/" QUrl. // Check url "http://127.0.0.1/" QUrl &.
// Continue. // Continue.
dummyStatement(&request, &raw); dummyStatement(&request, &raw);
} }