aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models/pref_models.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-08-09 11:28:04 +0200
committerRoland Knall <rknall@gmail.com>2019-08-09 11:03:07 +0000
commit372fc9ff6ce9d6c3b0860694876d7a16435901e3 (patch)
tree920a4f571403d54abbb191ca970c78f3f86213c5 /ui/qt/models/pref_models.h
parenta41c7aa2238288f894b32c78c34c490f4f42211f (diff)
Qt: Fix Preference dialog translation
The title names of each section are not presented correctly Bug: 15977 Change-Id: I68ab0fb6fc7131f9d2af67fa38c509ed6808c7d3 Reviewed-on: https://code.wireshark.org/review/34218 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/models/pref_models.h')
-rw-r--r--ui/qt/models/pref_models.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/ui/qt/models/pref_models.h b/ui/qt/models/pref_models.h
index 0f34150f74..4c0a591917 100644
--- a/ui/qt/models/pref_models.h
+++ b/ui/qt/models/pref_models.h
@@ -55,17 +55,17 @@ public:
explicit PrefsModel(QObject * parent = Q_NULLPTR);
virtual ~PrefsModel();
- //Names of special preferences handled by the GUI
- //Names used as keys to determine correct pan displayed
- static const char* ADVANCED_PREFERENCE_TREE_NAME;
- static const char* APPEARANCE_PREFERENCE_TREE_NAME;
- static const char* LAYOUT_PREFERENCE_TREE_NAME;
- static const char* COLUMNS_PREFERENCE_TREE_NAME;
- static const char* FONT_AND_COLORS_PREFERENCE_TREE_NAME;
- static const char* CAPTURE_PREFERENCE_TREE_NAME;
- static const char* EXPERT_PREFERENCE_TREE_NAME;
- static const char* FILTER_BUTTONS_PREFERENCE_TREE_NAME;
- static const char* RSA_KEYS_PREFERENCE_TREE_NAME;
+ enum PrefsModelType {
+ Advanced = Qt::UserRole,
+ Appearance,
+ Layout,
+ Columns,
+ FontAndColors,
+ Capture,
+ Expert,
+ FilterButtons,
+ RSAKeys
+ };
enum PrefsModelColumn {
colName = 0,
@@ -83,6 +83,8 @@ public:
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ static QString typeToString(int type);
+
private:
void populate();