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>
This commit is contained in:
hjk
2015-03-20 16:03:59 +01:00
parent b727c15a53
commit 48ac7c186b
11 changed files with 221 additions and 276 deletions

View File

@@ -31,6 +31,8 @@
#ifndef DEBUGGER_DIALOGS_H
#define DEBUGGER_DIALOGS_H
#include "watchhandler.h"
#include <projectexplorer/kitchooser.h>
#include <projectexplorer/abi.h>
@@ -162,8 +164,6 @@ private:
QDialogButtonBox *m_box;
};
typedef QHash<QString, QStringList> DumperTypeFormats;
class StartRemoteEngineDialog : public QDialog
{
Q_OBJECT
@@ -191,9 +191,8 @@ public:
explicit TypeFormatsDialog(QWidget *parent);
~TypeFormatsDialog();
void addTypeFormats(const QString &type, const QStringList &formats,
void addTypeFormats(const QString &type, const DisplayFormats &formats,
int currentFormat);
DumperTypeFormats typeFormats() const;
private:
TypeFormatsDialogUi *m_ui;