Commit b25e9509 authored by Laurent Montel's avatar Laurent Montel 😁

Use QDesktopService

parent 4640fb21
......@@ -64,7 +64,6 @@
#include <KLocalizedString>
#include <KSelectAction>
#include <kimagefilepreview.h>
#include <KToolInvocation>
#include <QMenu>
#include <QUrl>
......@@ -72,6 +71,7 @@
#include <QProgressBar>
#include <QTimer>
#include <QKeyEvent>
#include <QDesktopServices>
#define TIMEOUT 5000
......@@ -697,7 +697,7 @@ void MainWindow::slotOpenCurrentBlogInBrowser()
if (mCurrentBlogId > -1) {
QUrl url(DBMan::self()->blog(mCurrentBlogId)->blogUrl());
if (url.isValid()) {
KToolInvocation::invokeBrowser(url.url());
QDesktopServices::openUrl(url);
} else {
KMessageBox::sorry(this, i18n("Cannot find current blog URL."));
}
......
......@@ -16,6 +16,7 @@
*/
#include "webshortcutmenumanager.h"
#include <QDesktopServices>
#include <KToolInvocation>
#include <KUriFilterData>
#include <KStringHandler>
......@@ -107,7 +108,7 @@ void WebShortcutMenuManager::slotHandleWebShortcutAction()
if (action) {
KUriFilterData filterData(action->data().toString());
if (KUriFilter::self()->filterSearchUri(filterData, KUriFilter::WebShortcutFilter)) {
KToolInvocation::invokeBrowser(filterData.uri().url());
QDesktopServices::openUrl(filterData.uri());
}
}
}
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