[kdepimlibs] [Bug 346644] KF5/KMail Performance Bottleneck in Akonadi::StatisticsProxyModel::data(...)

Laurent Montel montel at kde.org
Sun Apr 26 09:27:55 BST 2015


https://bugs.kde.org/show_bug.cgi?id=346644

--- Comment #3 from Laurent Montel <montel at kde.org> ---
When I read qt code I see that icon is caching
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{
    QIcon icon;

    if (qtIconCache()->contains(name)) {
        icon = *qtIconCache()->object(name);
    } else {
        QPlatformTheme * const platformTheme =
QGuiApplicationPrivate::platformTheme();
        QIconEngine * const engine = platformTheme ?
platformTheme->createIconEngine(name)
                                                   : new
QIconLoaderEngine(name);
        QIcon *cachedIcon  = new QIcon(engine);
        icon = *cachedIcon;
        qtIconCache()->insert(name, cachedIcon);
    }

    // Note the qapp check is to allow lazy loading of static icons
    // Supporting fallbacks will not work for this case.
    if (qApp && icon.availableSizes().isEmpty())
        return fallback;

    return icon;
}

for the moment I don't understand why it doesn't work. Perhaps
CollectionUtils::displayIconName has a problem.
I will look at.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list