summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerdialogs.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-03-20 16:03:59 +0100
committerhjk <hjk@theqtcompany.com>2015-03-23 14:12:43 +0000
commit48ac7c186b0228f13bbd8a0f00ab39300765dc4a (patch)
tree73c36fc0dee1f7e922473f71b3ac8418dece7bb1 /src/plugins/debugger/debuggerdialogs.cpp
parentb727c15a534ce337e8cfcd49a0b091aee5462bf3 (diff)
downloadqt-creator-48ac7c186b0228f13bbd8a0f00ab39300765dc4a.tar.gz
Debugger: Re-organize passing of display formats
The current setup (dumper->gui: list of descriptions, gui->dumper: index in list) is fragile and not easily i18n'able. Go with an enum based approach now. Change-Id: Ie78c596065a8b2ba87ad725274da29d4be3a6da4 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/debuggerdialogs.cpp')
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 7b724bad3d..066323c193 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -807,7 +807,7 @@ public:
}
void addTypeFormats(const QString &type,
- const QStringList &typeFormats, int current)
+ const DisplayFormats &typeFormats, int current)
{
const int row = m_layout->rowCount();
int column = 0;
@@ -815,7 +815,8 @@ public:
m_layout->addWidget(new QLabel(type), row, column++);
for (int i = -1; i != typeFormats.size(); ++i) {
QRadioButton *choice = new QRadioButton(this);
- choice->setText(i == -1 ? TypeFormatsDialog::tr("Reset") : typeFormats.at(i));
+ choice->setText(i == -1 ? TypeFormatsDialog::tr("Reset")
+ : WatchHandler::nameForFormat(typeFormats.at(i)));
m_layout->addWidget(choice, row, column++);
if (i == current)
choice->setChecked(true);
@@ -868,7 +869,6 @@ private:
//
///////////////////////////////////////////////////////////////////////
-
TypeFormatsDialog::TypeFormatsDialog(QWidget *parent)
: QDialog(parent), m_ui(new TypeFormatsDialogUi(this))
{
@@ -888,7 +888,7 @@ TypeFormatsDialog::~TypeFormatsDialog()
}
void TypeFormatsDialog::addTypeFormats(const QString &type0,
- const QStringList &typeFormats, int current)
+ const DisplayFormats &typeFormats, int current)
{
QString type = type0;
type.replace(QLatin1String("__"), QLatin1String("::"));
@@ -900,10 +900,5 @@ void TypeFormatsDialog::addTypeFormats(const QString &type0,
m_ui->pages[pos]->addTypeFormats(type, typeFormats, current);
}
-DumperTypeFormats TypeFormatsDialog::typeFormats() const
-{
- return DumperTypeFormats();
-}
-
} // namespace Internal
} // namespace Debugger