Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
71ebe037
Commit
71ebe037
authored
Feb 10, 2022
by
Alexander Lohnau
💬
Browse files
Utilize KIO::OpenUrlJob for opening urls
This way we consistently use the KIO jobs for launching urls.
parent
dde0f20b
Pipeline
#139119
passed with stage
in 11 minutes and 12 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
runners/bookmarks/CMakeLists.txt
View file @
71ebe037
...
...
@@ -29,6 +29,7 @@ add_library(krunner_bookmarks_common STATIC ${krunner_bookmarks_common_SRCS})
target_link_libraries
(
krunner_bookmarks_common
Qt::Sql
KF5::KIOCore
KF5::KIOGui
KF5::I18n
KF5::Runner
KF5::Bookmarks
...
...
runners/bookmarks/bookmarksrunner.cpp
View file @
71ebe037
...
...
@@ -9,13 +9,13 @@
#include
"browsers/browser.h"
#include
<QDebug>
#include
<QDesktopServices>
#include
<QDir>
#include
<QList>
#include
<QStack>
#include
<QUrl>
#include
<KApplicationTrader>
#include
<KIO/OpenUrlJob>
#include
<KLocalizedString>
#include
<KSharedConfig>
...
...
@@ -108,7 +108,8 @@ void BookmarksRunner::run(const Plasma::RunnerContext &context, const Plasma::Qu
url
.
setScheme
(
QStringLiteral
(
"http"
));
}
QDesktopServices
::
openUrl
(
url
);
auto
job
=
new
KIO
::
OpenUrlJob
(
url
);
job
->
start
();
}
#include
"bookmarksrunner.moc"
runners/webshortcuts/webshortcutrunner.cpp
View file @
71ebe037
...
...
@@ -8,6 +8,7 @@
#include
<KApplicationTrader>
#include
<KIO/CommandLauncherJob>
#include
<KIO/OpenUrlJob>
#include
<KLocalizedString>
#include
<KSharedConfig>
#include
<KShell>
...
...
@@ -15,7 +16,6 @@
#include
<KUriFilter>
#include
<QAction>
#include
<QDBusConnection>
#include
<QDesktopServices>
WebshortcutRunner
::
WebshortcutRunner
(
QObject
*
parent
,
const
KPluginMetaData
&
metaData
,
const
QVariantList
&
args
)
:
Plasma
::
AbstractRunner
(
parent
,
metaData
,
args
)
...
...
@@ -177,7 +177,8 @@ void WebshortcutRunner::run(const Plasma::RunnerContext &context, const Plasma::
auto
*
job
=
new
KIO
::
CommandLauncherJob
(
command
);
job
->
start
();
}
else
{
QDesktopServices
::
openUrl
(
location
);
auto
job
=
new
KIO
::
OpenUrlJob
(
location
);
job
->
start
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment