aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-12-19 10:24:49 -0800
committerGerald Combs <gerald@wireshark.org>2018-12-19 19:51:58 +0000
commit099e5dddf2b098af47da32ce36917e87096db5e0 (patch)
tree7eb9bcd5d6a6b176398ea1251b5cae62a9430856 /ui
parentf01a9d9fe85b6dd8720bd5f8cf420c5f74e254f1 (diff)
Qt: Switch module preferences to new-style signals and slots.
Switch ModulePreferencesScrollArea to compile time signals and slots. Change-Id: Ic984c4a0b4538925f97e648695f4dcdc2699675c Reviewed-on: https://code.wireshark.org/review/31127 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/module_preferences_scroll_area.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/ui/qt/module_preferences_scroll_area.cpp b/ui/qt/module_preferences_scroll_area.cpp
index 6b3bf25106..9b4b544a78 100644
--- a/ui/qt/module_preferences_scroll_area.cpp
+++ b/ui/qt/module_preferences_scroll_area.cpp
@@ -246,20 +246,20 @@ ModulePreferencesScrollArea::ModulePreferencesScrollArea(module_t *module, QWidg
switch (prefs_get_type(pref)) {
case PREF_DECODE_AS_UINT:
- connect(le, SIGNAL(textEdited(QString)), this, SLOT(uintLineEditTextEdited(QString)));
+ connect(le, &QLineEdit::textEdited, this, &ModulePreferencesScrollArea::uintLineEditTextEdited);
break;
case PREF_UINT:
- connect(le, SIGNAL(textEdited(QString)), this, SLOT(uintLineEditTextEdited(QString)));
+ connect(le, &QLineEdit::textEdited, this, &ModulePreferencesScrollArea::uintLineEditTextEdited);
break;
case PREF_STRING:
case PREF_SAVE_FILENAME:
case PREF_OPEN_FILENAME:
case PREF_DIRNAME:
- connect(le, SIGNAL(textEdited(QString)), this, SLOT(stringLineEditTextEdited(QString)));
+ connect(le, &QLineEdit::textEdited, this, &ModulePreferencesScrollArea::stringLineEditTextEdited);
break;
case PREF_RANGE:
case PREF_DECODE_AS_RANGE:
- connect(le, SIGNAL(textEdited(QString)), this, SLOT(rangeSyntaxLineEditTextEdited(QString)));
+ connect(le, &QLineEdit::textEdited, this, &ModulePreferencesScrollArea::rangeSyntaxLineEditTextEdited);
break;
default:
break;
@@ -271,7 +271,7 @@ ModulePreferencesScrollArea::ModulePreferencesScrollArea(module_t *module, QWidg
if (!pref) continue;
if (prefs_get_type(pref) == PREF_BOOL) {
- connect(cb, SIGNAL(toggled(bool)), this, SLOT(boolCheckBoxToggled(bool)));
+ connect(cb, &QCheckBox::toggled, this, &ModulePreferencesScrollArea::boolCheckBoxToggled);
}
}
@@ -280,7 +280,7 @@ ModulePreferencesScrollArea::ModulePreferencesScrollArea(module_t *module, QWidg
if (!pref) continue;
if (prefs_get_type(pref) == PREF_ENUM && prefs_get_enum_radiobuttons(pref)) {
- connect(rb, SIGNAL(toggled(bool)), this, SLOT(enumRadioButtonToggled(bool)));
+ connect(rb, &QRadioButton::toggled, this, &ModulePreferencesScrollArea::enumRadioButtonToggled);
}
}
@@ -289,7 +289,8 @@ ModulePreferencesScrollArea::ModulePreferencesScrollArea(module_t *module, QWidg
if (!pref) continue;
if (prefs_get_type(pref) == PREF_ENUM && !prefs_get_enum_radiobuttons(pref)) {
- connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(enumComboBoxCurrentIndexChanged(int)));
+ connect(combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ this, &ModulePreferencesScrollArea::enumComboBoxCurrentIndexChanged);
}
}
@@ -299,16 +300,16 @@ ModulePreferencesScrollArea::ModulePreferencesScrollArea(module_t *module, QWidg
switch (prefs_get_type(pref)) {
case PREF_UAT:
- connect(pb, SIGNAL(clicked()), this, SLOT(uatPushButtonClicked()));
+ connect(pb, &QPushButton::clicked, this, &ModulePreferencesScrollArea::uatPushButtonClicked);
break;
case PREF_SAVE_FILENAME:
- connect(pb, SIGNAL(clicked()), this, SLOT(saveFilenamePushButtonClicked()));
+ connect(pb, &QPushButton::clicked, this, &ModulePreferencesScrollArea::saveFilenamePushButtonClicked);
break;
case PREF_OPEN_FILENAME:
- connect(pb, SIGNAL(clicked()), this, SLOT(openFilenamePushButtonClicked()));
+ connect(pb, &QPushButton::clicked, this, &ModulePreferencesScrollArea::openFilenamePushButtonClicked);
break;
case PREF_DIRNAME:
- connect(pb, SIGNAL(clicked()), this, SLOT(dirnamePushButtonClicked()));
+ connect(pb, &QPushButton::clicked, this, &ModulePreferencesScrollArea::dirnamePushButtonClicked);
break;
}
}