diff options
author | hjk <qtc-committer@nokia.com> | 2011-09-14 13:00:58 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-09-14 13:09:34 +0200 |
commit | a67d8205b19784b1b8237b7d4ecd1c13ca09c547 (patch) | |
tree | b697165375ef3031b9b300857320440a7f8b39e6 /src/plugins/debugger/registerwindow.cpp | |
parent | ce9ea72c670c0b4fea2f8be2e4628ed74337d37f (diff) | |
download | qt-creator-a67d8205b19784b1b8237b7d4ecd1c13ca09c547.tar.gz |
debugger: fix hex input when changing register values
Change-Id: I198e1631d488aff9250e3438ed2fade5aa89968b
Reviewed-on: http://codereview.qt-project.org/4888
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/registerwindow.cpp')
-rw-r--r-- | src/plugins/debugger/registerwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp index 735894b3f7..04b06705ff 100644 --- a/src/plugins/debugger/registerwindow.cpp +++ b/src/plugins/debugger/registerwindow.cpp @@ -111,7 +111,11 @@ public: return; IntegerWatchLineEdit *lineEdit = qobject_cast<IntegerWatchLineEdit*>(editor); QTC_ASSERT(lineEdit, return); - currentEngine()->setRegisterValue(index.row(), lineEdit->text()); + const int base = currentHandler()->numberBase(); + QString value = lineEdit->text(); + if (base == 16 && !value.startsWith("0x")) + value = "0x" + value; + currentEngine()->setRegisterValue(index.row(), value); } void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, |