Commit 03f3d05f authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from KMimeTypeTrader

KMimeTypeTrader is about to be deprecated. See https://phabricator.kde.org/T12177.
parent 83d0bf3a
......@@ -27,7 +27,6 @@
#include <KMessageBox>
#include <KConfig>
#include <KStandardDirs>
#include <KMimeTypeTrader>
#include <KUrlRequester>
#include <KToolInvocation>
#include <KConfigGroup>
......
......@@ -19,7 +19,7 @@
#include <KLocalizedString>
#include <KServiceTypeTrader>
#include <KMimeTypeTrader>
#include <KApplicationTrader>
#include <QUrl>
#include <QDBusConnection>
......@@ -68,7 +68,7 @@ void CfgBrowser::selectBrowser(int index)
void CfgBrowser::load(KConfig *)
{
const auto browser = KMimeTypeTrader::self()->preferredService("x-scheme-handler/http");
const auto browser = KApplicationTrader::preferredService("x-scheme-handler/http");
clear();
m_currentIndex = -1;
......
......@@ -18,12 +18,12 @@
#include <KEMailSettings>
#include <KOpenWithDialog>
#include <KApplicationTrader>
#include <KLocalizedString>
#include <KConfigGroup>
#include <KSharedConfig>
#include <KService>
#include <KServiceTypeTrader>
#include <KMimeTypeTrader>
#include <KShell>
#include <QDBusConnection>
......@@ -52,7 +52,7 @@ CfgEmailClient::~CfgEmailClient() {
void CfgEmailClient::load(KConfig *)
{
const KService::Ptr emailClientService = KMimeTypeTrader::self()->preferredService(s_mimetype);
const KService::Ptr emailClientService = KApplicationTrader::preferredService(s_mimetype);
const auto emailClients = KServiceTypeTrader::self()->query(QStringLiteral("Application"),
QStringLiteral("'Email' in Categories and 'x-scheme-handler/mailto' in ServiceTypes"));
......
......@@ -21,7 +21,6 @@
#include "componentchooserfilemanager.h"
#include <KProcess>
#include <KMimeTypeTrader>
#include <KApplicationTrader>
#include <KOpenWithDialog>
#include <KConfigGroup>
......@@ -76,7 +75,7 @@ void CfgFileManager::load(KConfig *)
m_currentIndex = -1;
m_defaultIndex = -1;
const KService::Ptr fileManager = KMimeTypeTrader::self()->preferredService(mime);
const KService::Ptr fileManager = KApplicationTrader::preferredService(mime);
const auto fileManagers = KApplicationTrader::query([] (const KService::Ptr &service) {
if (service->exec().isEmpty()) {
......
......@@ -25,7 +25,6 @@
#include <KOpenWithDialog>
#include <KConfig>
#include <KMimeTypeTrader>
#include <KUrlRequester>
#include <KConfigGroup>
#include <KLocalizedString>
......
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