summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamarque V. Souza <lamarque@gmail.com>2011-04-04 22:03:05 (GMT)
committerLamarque V. Souza <lamarque@gmail.com>2011-04-04 22:03:05 (GMT)
commitb7f2cc478c6ade20c1a5f1ff0ae767b2d62b2785 (patch)
tree3ef4a0f608e3e975652425fabcc62f96ce2816e6
parenta9a0526bf1cfd6ed768518286122c576ba6644a3 (diff)
Fix networkmanagement_configshell launching:
KToolInvocation::kdeinitExec searchs only in $PATH, but networkmanagement_configshell is not in $PATH, it is located in $KDEDIR/kde4/libexec/networkmanagement_configshell. Using KGlobal::dirs()->findResource("exe", "networkmanagement_configshell") solves this problem. This fix makes it possible to click on an AP in the connection list at the right widget to open the wireless configuration dialog with most settings (essid, encryption type, etc) filled in.
-rw-r--r--applet/activatablelistwidget.cpp3
-rw-r--r--libs/service/configurationlauncher.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/applet/activatablelistwidget.cpp b/applet/activatablelistwidget.cpp
index d830ccf..480b361 100644
--- a/applet/activatablelistwidget.cpp
+++ b/applet/activatablelistwidget.cpp
@@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDebug>
#include <solid/control/networkmanager.h>
#include <KToolInvocation>
+#include <KStandardDirs>
// Plasma
#include <Plasma/Label>
@@ -356,6 +357,6 @@ void ActivatableListWidget::connectToHiddenNetwork(const QString &ssid)
m_hiddenConnectionInProgress << ssid;
QStringList args = QStringList(ssid) << "create";
kDebug() << "invoking networkmanagement_configshell" << args;
- KToolInvocation::kdeinitExec("networkmanagement_configshell", args);
+ KToolInvocation::kdeinitExec(KGlobal::dirs()->findResource("exe", "networkmanagement_configshell"), args);
}
// vim: sw=4 sts=4 et tw=100
diff --git a/libs/service/configurationlauncher.cpp b/libs/service/configurationlauncher.cpp
index 868c69f..b5e235c 100644
--- a/libs/service/configurationlauncher.cpp
+++ b/libs/service/configurationlauncher.cpp
@@ -27,6 +27,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <KDebug>
#include <KToolInvocation>
+#include <KStandardDirs>
#include <solid/control/networkmanager.h>
#include <solid/control/networkinterface.h>
@@ -149,7 +150,7 @@ void ConfigurationLauncher::configureWirelessNetworkInternal(const QString & ssi
.arg(apUni);
args << QLatin1String("create") << QLatin1String("--type") << QLatin1String("802-11-wireless") << QLatin1String("--specific-args") << moduleArgs << QLatin1String("wifi_pass");
- int ret = KToolInvocation::kdeinitExec("networkmanagement_configshell", args);
+ int ret = KToolInvocation::kdeinitExec(KGlobal::dirs()->findResource("exe", "networkmanagement_configshell"), args);
kDebug() << ret << args;
}
}
@@ -217,7 +218,7 @@ void ConfigurationLauncher::unconfiguredInterfaceActivated()
if (!editorArgs.isEmpty()) {
args << QLatin1String("--specific-args") << editorArgs;
}
- int ret = KToolInvocation::kdeinitExec("networkmanagement_configshell", args);
+ int ret = KToolInvocation::kdeinitExec(KGlobal::dirs()->findResource("exe", "networkmanagement_configshell"), args);
kDebug() << ret << args;
}
}