Commit f8939368 authored by Nicolas Fella's avatar Nicolas Fella Committed by David Faure
Browse files

Port from KMimeTypeTrader to KParts::PartLoader

parent 2344d986
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include <KIO/FavIconRequestJob> #include <KIO/FavIconRequestJob>
#include <kio/job.h> #include <kio/job.h>
#include <KMimeTypeTrader>
#include <KParts/BrowserExtension> #include <KParts/BrowserExtension>
#include <KParts/PartLoader>
FavIconUpdater::FavIconUpdater(QObject *parent) FavIconUpdater::FavIconUpdater(QObject *parent)
: QObject(parent) : QObject(parent)
...@@ -74,12 +74,8 @@ void FavIconUpdater::downloadIconUsingWebBrowser(const KBookmark &bk, const QStr ...@@ -74,12 +74,8 @@ void FavIconUpdater::downloadIconUsingWebBrowser(const KBookmark &bk, const QStr
if (!m_part) { if (!m_part) {
QString partLoadingError; QString partLoadingError;
KParts::ReadOnlyPart *part = KMimeTypeTrader::createPartInstanceFromQuery<KParts::ReadOnlyPart>(QStringLiteral("text/html"), KParts::ReadOnlyPart *part =
nullptr, KParts::PartLoader::createPartInstanceForMimeType<KParts::ReadOnlyPart>(QStringLiteral("text/html"), nullptr, this, &partLoadingError);
this,
QString(),
QVariantList(),
&partLoadingError);
if (!part) { if (!part) {
Q_EMIT done(false, i18n("%1; no HTML component found (%2)", currentError, partLoadingError)); Q_EMIT done(false, i18n("%1; no HTML component found (%2)", currentError, partLoadingError));
return; return;
......
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