Commit 5fbd1766 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg
Browse files

Handle opening urls outside of a full Plasma session a bit better

If Qt detects a plasma session it uses kfmclient anyways (so the current
behavior), but if it detects gnome it uses gnome-open, xdg-portal dbus
call if it detects that, etc.
parent a07c4594
Pipeline #122421 passed with stage
in 1 minute and 59 seconds
......@@ -7,12 +7,10 @@
#include "UrlFilterHotspot.h"
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#include <QAction>
#include <QApplication>
#include <QClipboard>
#include <QDesktopServices>
#include <QRegularExpression>
#include <KLocalizedString>
......@@ -77,9 +75,7 @@ void UrlFilterHotSpot::activate(QObject *object)
url.prepend(QLatin1String("mailto:"));
}
auto *job = new KIO::OpenUrlJob(QUrl(url));
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, QApplication::activeWindow()));
job->start();
QDesktopServices::openUrl(QUrl(url));
}
}
......
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