small changes before work on plasmoid

This commit is contained in:
arcan1s
2014-03-21 19:11:47 +04:00
parent 028b636d22
commit 80e4b3e3d3
5 changed files with 21 additions and 32 deletions

View File

@ -206,9 +206,9 @@ bool Netctl::updateSourceEvent(const QString &source)
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].indexOf(QString("enabled")) > -1)
if (profile[i].contains(QString("enabled")))
value = QString("enabled");
else if (profile[i].indexOf(QString("static")) > -1)
else if (profile[i].contains(QString("static")))
value = QString("static");
break;
}