summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/registerhandler.cpp
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-04-08 12:11:30 +0200
committerhjk <qtc-committer@nokia.com>2009-04-08 16:05:49 +0200
commit3e38a0598b0e094afd91b854d530fda034e25ec2 (patch)
treeb877ffea8fda4f84420b6005b5168f7a09413afb /src/plugins/debugger/registerhandler.cpp
parent7a77f8375938212ac228b03845cbdc55a65066d5 (diff)
downloadqt-creator-3e38a0598b0e094afd91b854d530fda034e25ec2.tar.gz
debugger: make user visible strings translatable
Diffstat (limited to 'src/plugins/debugger/registerhandler.cpp')
-rw-r--r--src/plugins/debugger/registerhandler.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/debugger/registerhandler.cpp b/src/plugins/debugger/registerhandler.cpp
index 12dd1d2131..2bb3ab289a 100644
--- a/src/plugins/debugger/registerhandler.cpp
+++ b/src/plugins/debugger/registerhandler.cpp
@@ -75,10 +75,8 @@ QVariant RegisterHandler::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole) {
switch (index.column()) {
- case 0:
- return reg.name;
- case 1:
- return reg.value;
+ case 0: return reg.name;
+ case 1: return reg.value;
}
}
if (role == Qt::TextColorRole && reg.changed && index.column() == 1)
@@ -90,12 +88,10 @@ QVariant RegisterHandler::headerData(int section, Qt::Orientation orientation,
int role) const
{
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
- static const char * const headers[] = {
- QT_TR_NOOP("Name"),
- QT_TR_NOOP("Value"),
+ switch (section) {
+ case 0: return tr("Name");
+ case 1: return tr("Value");
};
- if (section < 2)
- return tr(headers[section]);
}
return QVariant();
}