src/gui/painting/qbrush.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/gui/painting/qbrush.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/painting/qbrush.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -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 @@
 
 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);
@@ -329,8 +332,8 @@
 
     \endtable
 
-    For more information about painting in general, see \l{The Paint
-    System} documentation.
+    For more information about painting in general, see the \l{Paint
+    System}.
 
     \sa Qt::BrushStyle, QPainter, QColor
 */
@@ -1013,7 +1016,7 @@
     Writes the given \a brush to the given \a stream and returns a
     reference to the \a stream.
 
-    \sa {Format of the QDataStream Operators}
+    \sa {Serializing Qt Data Types}
 */
 
 QDataStream &operator<<(QDataStream &s, const QBrush &b)
@@ -1081,7 +1084,7 @@
     Reads the given \a brush from the given \a stream and returns a
     reference to the \a stream.
 
-    \sa {Format of the QDataStream Operators}
+    \sa {Serializing Qt Data Types}
 */
 
 QDataStream &operator>>(QDataStream &s, QBrush &b)