Commit 8f936ab9 authored by Lukáš Tinkl's avatar Lukáš Tinkl
Browse files

port away from KStandardDirs

parent 6587627f
......@@ -29,7 +29,6 @@
#include <QUuid>
#include <QDebug>
#include <KStandardDirs>
#include <KLocalizedString>
#include <KMessageBox>
......
......@@ -23,11 +23,12 @@
#include "nm-openvpn-service.h"
#include "settingwidget.h"
#include <QStandardPaths>
#include <QUrl>
#include <KLocalizedString>
#include <KProcess>
#include <KStandardDirs>
#include <KAcceleratorManager>
#include <QUrl>
class OpenVpnAdvancedWidget::Private {
public:
......@@ -69,7 +70,7 @@ OpenVpnAdvancedWidget::OpenVpnAdvancedWidget(const NetworkManager::VpnSetting::P
connect(m_ui->cmbProxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(proxyTypeChanged(int)));
// start openVPN process and get its cipher list
const QString openVpnBinary = KStandardDirs::findExe("openvpn", "/sbin:/usr/sbin");
const QString openVpnBinary = QStandardPaths::findExecutable("openvpn", QStringList() << "/sbin" << "/usr/sbin");
const QStringList args(QLatin1String("--show-ciphers"));
d->openvpnProcess = new KProcess(this);
d->openvpnProcess->setOutputChannelMode(KProcess::OnlyStdoutChannel);
......
......@@ -26,7 +26,6 @@
#include <QDebug>
#include <KProcess>
#include <KStandardDirs>
#include <KUrlRequester>
#include <KLineEdit>
#include <QUrl>
......
......@@ -23,9 +23,11 @@
#include "vpnc.h"
#include <QStandardPaths>
#include <QFile>
#include <KPluginFactory>
#include <KSharedConfig>
#include <KStandardDirs>
#include <KMessageBox>
#include <KLocalizedString>
#include <QDebug>
......@@ -147,7 +149,7 @@ NMVariantMapMap VpncUiPlugin::importConnectionSettings(const QString &fileName)
KConfigGroup cg(config, "main"); // Keys&Values are stored under [main]
if (cg.exists()) {
// Setup cisco-decrypt binary to decrypt the passwords
const QString ciscoDecryptBinary = KStandardDirs::findExe("cisco-decrypt", QString::fromLocal8Bit(qgetenv("PATH")) + ":/usr/lib/vpnc");
const QString ciscoDecryptBinary = QStandardPaths::findExecutable("cisco-decrypt", QStringList() << QFile::decodeName(qgetenv("PATH")) << "/usr/lib/vpnc");
if (ciscoDecryptBinary.isEmpty()) {
mErrorMessage = i18n("Needed executable cisco-decrypt could not be found.");
return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment