mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
parent
8dd48fa7cc
commit
4bc428f8b5
@ -30,11 +30,12 @@ QList<netctlProfileInfo> parseOutputNetctl(const QList<QVariant> raw,
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
QList<netctlProfileInfo> profileInfo;
|
QList<netctlProfileInfo> profileInfo;
|
||||||
if (raw.size() == 0)
|
if (raw.size() == 0) return profileInfo;
|
||||||
return profileInfo;
|
QStringList list = raw[0].toStringList();
|
||||||
for (int i=0; i<raw[0].toStringList().count(); i++) {
|
for (int i=0; i<list.count(); i++) {
|
||||||
|
QStringList info = list[i].split(QChar('|'));
|
||||||
|
if (info.count() != 4) continue;
|
||||||
netctlProfileInfo profile;
|
netctlProfileInfo profile;
|
||||||
QStringList info = raw[0].toStringList()[i].split(QChar('|'));
|
|
||||||
profile.name = info[0];
|
profile.name = info[0];
|
||||||
profile.description = info[1];
|
profile.description = info[1];
|
||||||
profile.active = info[2].toInt();
|
profile.active = info[2].toInt();
|
||||||
@ -52,11 +53,12 @@ QList<netctlWifiInfo> parseOutputWifi(const QList<QVariant> raw,
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
QList<netctlWifiInfo> wifiInfo;
|
QList<netctlWifiInfo> wifiInfo;
|
||||||
if (raw.size() == 0)
|
if (raw.size() == 0) return wifiInfo;
|
||||||
return wifiInfo;
|
QStringList list = raw[0].toStringList();
|
||||||
for (int i=0; i<raw[0].toStringList().count(); i++) {
|
for (int i=0; i<list.count(); i++) {
|
||||||
|
QStringList info = list[i].split(QChar('|'));
|
||||||
|
if (info.count() != 5) continue;
|
||||||
netctlWifiInfo wifi;
|
netctlWifiInfo wifi;
|
||||||
QStringList info = raw[0].toStringList()[i].split(QChar('|'));
|
|
||||||
wifi.name = info[0];
|
wifi.name = info[0];
|
||||||
wifi.security = info[1];
|
wifi.security = info[1];
|
||||||
wifi.signal = info[2];
|
wifi.signal = info[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user