mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-05 10:05:46 +00:00
add test support of several active profiles to gui, library and helper
This commit is contained in:
@ -86,7 +86,7 @@ public:
|
||||
* @brief method which returns active profile name
|
||||
* @return profile name or ""
|
||||
*/
|
||||
QString getActiveProfile();
|
||||
QStringList getActiveProfile();
|
||||
/**
|
||||
* @brief method which returns active profile name from netctl-auto
|
||||
* @return profile name or ""
|
||||
|
@ -147,17 +147,15 @@ QString Netctl::getCmdOutput(const bool sudo, const QString command, const QStri
|
||||
/**
|
||||
* @fn getActiveProfile
|
||||
*/
|
||||
QString Netctl::getActiveProfile()
|
||||
QStringList Netctl::getActiveProfile()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
QString profile = QString("");
|
||||
QStringList profile;
|
||||
QList<netctlProfileInfo> fullProfilesInfo = getProfileList();
|
||||
for (int i=0; i<fullProfilesInfo.count(); i++)
|
||||
if (fullProfilesInfo[i].active) {
|
||||
profile = fullProfilesInfo[i].name;
|
||||
break;
|
||||
}
|
||||
if (fullProfilesInfo[i].active)
|
||||
profile.append(fullProfilesInfo[i].name);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
Reference in New Issue
Block a user