mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
plasma: use the new option/argument of KMimeType::favIconForUrl() in bookmarks runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b1046f7928
commit
91e09232ba
1 changed files with 2 additions and 11 deletions
|
@ -32,18 +32,9 @@ Favicon::Favicon(QObject *parent) :
|
|||
|
||||
QIcon Favicon::iconFor(const QString &url) {
|
||||
const KUrl kurl(url);
|
||||
QString iconFile = KMimeType::favIconForUrl(kurl);
|
||||
QString iconFile = KMimeType::favIconForUrl(kurl, true);
|
||||
if (iconFile.isEmpty()) {
|
||||
QDBusInterface kded(QString::fromLatin1("org.kde.kded"),
|
||||
QString::fromLatin1("/modules/favicons"),
|
||||
QString::fromLatin1("org.kde.FavIcon"));
|
||||
const QDBusReply<void> reply = kded.call(QString::fromLatin1("downloadHostIcon"), url );
|
||||
if (reply.isValid()) {
|
||||
iconFile = KMimeType::favIconForUrl(kurl);
|
||||
}
|
||||
if (iconFile.isEmpty()) {
|
||||
return defaultIcon();
|
||||
}
|
||||
return defaultIcon();
|
||||
}
|
||||
return KIcon(iconFile);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue