equal
deleted
inserted
replaced
60 #endif |
60 #endif |
61 |
61 |
62 #ifdef Q_WS_X11 |
62 #ifdef Q_WS_X11 |
63 #include <private/qt_x11_p.h> |
63 #include <private/qt_x11_p.h> |
64 #endif |
64 #endif |
|
65 |
|
66 #include <private/qstylehelper_p.h> |
65 |
67 |
66 QT_BEGIN_NAMESPACE |
68 QT_BEGIN_NAMESPACE |
67 |
69 |
68 Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) |
70 Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance) |
69 |
71 |
486 // key, otherwise the cache key is not unique |
488 // key, otherwise the cache key is not unique |
487 if (basePixmap.isNull()) |
489 if (basePixmap.isNull()) |
488 basePixmap.load(filename); |
490 basePixmap.load(filename); |
489 |
491 |
490 int actualSize = qMin(size.width(), size.height()); |
492 int actualSize = qMin(size.width(), size.height()); |
491 QString key = QLatin1String("$qt_theme_") |
493 |
492 + QString::number(basePixmap.cacheKey(), 16) |
494 QString key = QLatin1Literal("$qt_theme_") |
493 + QLatin1Char('_') |
495 % HexString<qint64>(basePixmap.cacheKey()) |
494 + QString::number(mode) |
496 % HexString<int>(mode) |
495 + QLatin1Char('_') |
497 % HexString<qint64>(qApp->palette().cacheKey()) |
496 + QString::number(qApp->palette().cacheKey(), 16) |
498 % HexString<int>(actualSize); |
497 + QLatin1Char('_') |
|
498 + QString::number(actualSize); |
|
499 |
499 |
500 QPixmap cachedPixmap; |
500 QPixmap cachedPixmap; |
501 if (QPixmapCache::find(key, &cachedPixmap)) { |
501 if (QPixmapCache::find(key, &cachedPixmap)) { |
502 return cachedPixmap; |
502 return cachedPixmap; |
503 } else { |
503 } else { |