mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-05 18:15:47 +00:00
it works!
This commit is contained in:
@ -200,15 +200,19 @@ bool Netctl::updateSourceEvent(const QString &source)
|
||||
command.start(cmd + QString(" status ") + currentProfile);
|
||||
command.waitForFinished(-1);
|
||||
cmdOutput = command.readAllStandardOutput();
|
||||
value = QString("static");
|
||||
if (cmdOutput != QString("")) {
|
||||
QStringList profile = cmdOutput.split(QString("\n"), QString::SkipEmptyParts);
|
||||
for (int i=0; i<profile.count(); i++)
|
||||
if (profile[i].split(QString(" "), QString::SkipEmptyParts)[0] == QString("Loaded:"))
|
||||
if (profile[i].split(QString(" "), QString::SkipEmptyParts)[0] == QString("Loaded:")) {
|
||||
if (profile[i].indexOf(QString("enabled")) > -1) {
|
||||
value = QString("enabled");
|
||||
break;
|
||||
}
|
||||
else if (profile[i].indexOf(QString("static")) > -1) {
|
||||
value = QString("static");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
setData(source, QString("value"), value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user