Cosmetic, use initializer list
This commit is contained in:
parent
a855b9672a
commit
9f50aa89e5
1 changed files with 2 additions and 5 deletions
|
|
@ -173,8 +173,7 @@ void NetworkConfig::eapChanged(int sel) {
|
||||||
while (phase2Select->count())
|
while (phase2Select->count())
|
||||||
phase2Select->removeItem(0);
|
phase2Select->removeItem(0);
|
||||||
|
|
||||||
QStringList inner;
|
static const QStringList inner = { "PEAP", "TTLS", "FAST" };
|
||||||
inner << "PEAP" << "TTLS" << "FAST";
|
|
||||||
if (!inner.contains(eapSelect->itemText(sel)))
|
if (!inner.contains(eapSelect->itemText(sel)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -191,9 +190,7 @@ void NetworkConfig::eapChanged(int sel) {
|
||||||
|
|
||||||
/* Add all enabled EAP methods that can be used in the tunnel */
|
/* Add all enabled EAP methods that can be used in the tunnel */
|
||||||
int i;
|
int i;
|
||||||
QStringList allowed;
|
static const QStringList allowed = { "MSCHAPV2", "MD5", "GTC", "TLS", "OTP", "SIM","AKA" };
|
||||||
allowed << "MSCHAPV2" << "MD5" << "GTC" << "TLS" << "OTP" << "SIM"
|
|
||||||
<< "AKA";
|
|
||||||
for (i = 0; i < eapSelect->count(); i++) {
|
for (i = 0; i < eapSelect->count(); i++) {
|
||||||
if (allowed.contains(eapSelect->itemText(i))) {
|
if (allowed.contains(eapSelect->itemText(i))) {
|
||||||
phase2Select->addItem("EAP-" + eapSelect->itemText(i));
|
phase2Select->addItem("EAP-" + eapSelect->itemText(i));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue