summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/registerwindow.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-09-14 13:00:58 +0200
committerhjk <qthjk@ovi.com>2011-09-14 13:09:34 +0200
commita67d8205b19784b1b8237b7d4ecd1c13ca09c547 (patch)
treeb697165375ef3031b9b300857320440a7f8b39e6 /src/plugins/debugger/registerwindow.cpp
parentce9ea72c670c0b4fea2f8be2e4628ed74337d37f (diff)
downloadqt-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.cpp6
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,