mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-15 14:55:49 +00:00
add test support of several active profiles to gui, library and helper
This commit is contained in:
@ -54,7 +54,9 @@ endif()
|
||||
|
||||
add_executable (${SUBPROJECT} ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
add_executable (${SUBPROJECT}-suid ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT}-suid ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
# install properties
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin RENAME ${SUBPROJECT}-suid
|
||||
install (TARGETS ${SUBPROJECT}-suid DESTINATION bin
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID)
|
||||
|
@ -42,7 +42,7 @@ QString NetctlAdaptor::ActiveProfile()
|
||||
if (isNetctlAutoActive())
|
||||
return netctlCommand->autoGetActiveProfile();
|
||||
else
|
||||
return netctlCommand->getActiveProfile();
|
||||
return netctlCommand->getActiveProfile().join(QChar('|'));
|
||||
}
|
||||
|
||||
|
||||
@ -50,8 +50,13 @@ QString NetctlAdaptor::ActiveProfileStatus()
|
||||
{
|
||||
if (isNetctlAutoActive())
|
||||
return QString("netctl-auto");
|
||||
else
|
||||
return netctlCommand->getProfileStatus(ActiveProfile());
|
||||
else {
|
||||
QStringList status;
|
||||
QStringList profiles = ActiveProfile().split(QChar('|'));
|
||||
for (int i=0; i<profiles.count(); i++)
|
||||
status.append(netctlCommand->getProfileStatus(profiles[i]));
|
||||
return status.join(QChar('|'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user