Commit 0123b144 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix opening kwallet manager

We were trying to launch a service (kwalletmanager_open) that doesn't exist.
kwalletmanager5_open exists though.

We don't need to do special handling for the manager being open already given that kwalletmanager is a KDBusService.

This has the nice sideeffect of getting rid of QDBusInterface and KToolInvokation
parent 48a0e965
......@@ -55,7 +55,6 @@
#include <KUrlLabel>
#include <KMessageBox>
#include <KStringHandler>
#include <KToolInvocation>
#include <KAcceleratorManager>
#include <KFileItem>
#include <KMessageWidget>
......@@ -71,6 +70,7 @@
#include <KProtocolInfo>
#include <KParts/PartActivateEvent>
#include <KParts/BrowserInterface>
#include <KIO/ApplicationLauncherJob>
#include <QUrl>
#include <QFile>
......@@ -826,11 +826,9 @@ void WebEnginePart::slotShowWalletMenu()
void WebEnginePart::slotLaunchWalletManager()
{
QDBusInterface r(QStringLiteral("org.kde.kwalletmanager"), QStringLiteral("/kwalletmanager/MainWindow_1"));
if (r.isValid())
r.call(QDBus::NoBlock, QStringLiteral("show"));
else
KToolInvocation::startServiceByDesktopName(QStringLiteral("kwalletmanager_show"));
const KService::Ptr kwalletManager = KService::serviceByDesktopName(QStringLiteral("org.kde.kwalletmanager5"));
auto job = new KIO::ApplicationLauncherJob(kwalletManager);
job->start();
}
void WebEnginePart::slotDeleteNonPasswordStorableSite()
......
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