forked from osmocom/wireshark
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>
This commit is contained in:
parent
f01a9d9fe8
commit
099e5dddf2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue