From 9f50aa89e51ef33ebf7e616fef11752ea59d25e9 Mon Sep 17 00:00:00 2001 From: "loh.tar" Date: Thu, 14 Mar 2024 13:13:25 +0100 Subject: [PATCH] Cosmetic, use initializer list --- src/networkconfig.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/networkconfig.cpp b/src/networkconfig.cpp index 13f1415..22537da 100644 --- a/src/networkconfig.cpp +++ b/src/networkconfig.cpp @@ -173,8 +173,7 @@ void NetworkConfig::eapChanged(int sel) { while (phase2Select->count()) phase2Select->removeItem(0); - QStringList inner; - inner << "PEAP" << "TTLS" << "FAST"; + static const QStringList inner = { "PEAP", "TTLS", "FAST" }; if (!inner.contains(eapSelect->itemText(sel))) return; @@ -191,9 +190,7 @@ void NetworkConfig::eapChanged(int sel) { /* Add all enabled EAP methods that can be used in the tunnel */ int i; - QStringList allowed; - allowed << "MSCHAPV2" << "MD5" << "GTC" << "TLS" << "OTP" << "SIM" - << "AKA"; + static const QStringList allowed = { "MSCHAPV2", "MD5", "GTC", "TLS", "OTP", "SIM","AKA" }; for (i = 0; i < eapSelect->count(); i++) { if (allowed.contains(eapSelect->itemText(i))) { phase2Select->addItem("EAP-" + eapSelect->itemText(i));