mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
fix startprofileslot
This commit is contained in:
parent
abbc5641cd
commit
f238ba3a6a
@ -138,9 +138,10 @@ bool MainWindow::startProfileSlot(const QString profile)
|
||||
if (useHelper) {
|
||||
QList<QVariant> args;
|
||||
args.append(profile);
|
||||
if (sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
|
||||
DBUS_HELPER_INTERFACE, QString("ActiveProfile"),
|
||||
QList<QVariant>(), true, debug)[0].toString().isEmpty())
|
||||
QString currentProfile = sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_LIB_PATH,
|
||||
DBUS_HELPER_INTERFACE, QString("ActiveProfile"),
|
||||
QList<QVariant>(), true, debug)[0].toString();
|
||||
if ((currentProfile.isEmpty()) || (currentProfile == profile))
|
||||
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
|
||||
DBUS_HELPER_INTERFACE, QString("Start"),
|
||||
args, true, debug);
|
||||
@ -152,7 +153,8 @@ bool MainWindow::startProfileSlot(const QString profile)
|
||||
DBUS_HELPER_INTERFACE, QString("isProfileActive"),
|
||||
args, true, debug)[0].toBool();
|
||||
} else {
|
||||
if (netctlCommand->getActiveProfile().isEmpty())
|
||||
QString currentProfile = netctlCommand->getActiveProfile();
|
||||
if ((currentProfile.isEmpty()) || (currentProfile == profile))
|
||||
netctlCommand->startProfile(profile);
|
||||
else
|
||||
netctlCommand->switchToProfile(profile);
|
||||
|
Loading…
Reference in New Issue
Block a user