summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qbrush.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-06-02 10:58:17 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-06-02 11:19:30 (GMT)
commit7644a925dab5400280228cd2f7381030368c6913 (patch)
tree8a75c4740c62a507de70a363cb6b0919601a926e /src/gui/painting/qbrush.cpp
parent417f3a4ece9403d1eb37ce0ecdf74cf670bdd0ff (diff)
downloadQt-7644a925dab5400280228cd2f7381030368c6913.zip
Qt-7644a925dab5400280228cd2f7381030368c6913.tar.gz
Qt-7644a925dab5400280228cd2f7381030368c6913.tar.bz2
More Pixmap cache key optimizations
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r--src/gui/painting/qbrush.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index b468b11..d3061d8 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -48,6 +48,7 @@
#include "qline.h"
#include "qdebug.h"
#include <QtCore/qcoreapplication.h>
+#include "private/qstylehelper_p.h"
QT_BEGIN_NAMESPACE
@@ -96,9 +97,11 @@ const uchar *qt_patternForBrush(int brushStyle, bool invert)
QPixmap qt_pixmapForBrush(int brushStyle, bool invert)
{
+
QPixmap pm;
- QString key = QLatin1String("$qt-brush$") + QString::number(brushStyle)
- + QString::number((int)invert);
+ QString key = QLatin1Literal("$qt-brush$")
+ % HexString<uint>(brushStyle)
+ % QLatin1Char(invert ? '1' : '0');
if (!QPixmapCache::find(key, pm)) {
pm = QBitmap::fromData(QSize(8, 8), qt_patternForBrush(brushStyle, invert),
QImage::Format_MonoLSB);