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