Commit 060aebfe authored by Ahmad Samir's avatar Ahmad Samir

[FilePropertiesPlugin] Port KRun to OpenUrlJob

All unit tests still pass.
parent b611951b
......@@ -29,7 +29,8 @@
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginLoader>
#include <KRun>
#include <KIO/JobUiDelegate>
#include <KIO/OpenUrlJob>
#include "filemetadatawidget.h"
......@@ -49,7 +50,9 @@ BalooFilePropertiesPlugin::BalooFilePropertiesPlugin(QObject *parent, const QLis
auto *metaDataWidget = new Baloo::FileMetaDataWidget();
metaDataWidget->setItems(properties->items());
connect(metaDataWidget, &Baloo::FileMetaDataWidget::urlActivated, this, [this](const QUrl &url) {
new KRun(url, properties);
KIO::OpenUrlJob *job = new KIO::OpenUrlJob(url);
job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, properties));
job->start();
});
containerLayout->addWidget(metaDataWidget);
......
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