Index: trunk/src/gui/styles/qplastiquestyle.cpp
===================================================================
--- trunk/src/gui/styles/qplastiquestyle.cpp	(revision 651)
+++ trunk/src/gui/styles/qplastiquestyle.cpp	(revision 846)
@@ -1,5 +1,5 @@
 /****************************************************************************
 **
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
@@ -51,5 +51,4 @@
 
 #include "qwindowsstyle_p.h"
-#include <private/qstylehelper_p.h>
 #include <qapplication.h>
 #include <qbitmap.h>
@@ -57,5 +56,4 @@
 #include <qcheckbox.h>
 #include <qcombobox.h>
-#include <qdatetime.h>
 #include <qdebug.h>
 #include <qdialogbuttonbox.h>
@@ -82,4 +80,5 @@
 #include <qstyleoption.h>
 #include <qtextedit.h>
+#include <qelapsedtimer.h>
 #include <qtoolbar.h>
 #include <qtoolbox.h>
@@ -89,4 +88,5 @@
 #include <qvarlengtharray.h>
 #include <limits.h>
+#include <private/qstylehelper_p.h>
 
 QT_BEGIN_NAMESPACE
@@ -489,5 +489,7 @@
         QPixmap texture = brush->texture();
         QPixmap pixmap;
-        QString name = QString::fromLatin1("qbrushtexture-alpha-%1-%2").arg(alpha).arg(texture.cacheKey());
+        QString name = QLatin1Literal("qbrushtexture-alpha")
+                       % HexString<qreal>(alpha)
+                       % HexString<qint64>(texture.cacheKey());
         if (!QPixmapCache::find(name, pixmap)) {
             QImage image = texture.toImage();
@@ -550,5 +552,8 @@
         QPixmap texture = brush.texture();
         QPixmap pixmap;
-        QString name = QString::fromLatin1("qbrushtexture-light-%1-%2").arg(light).arg(texture.cacheKey());
+        QString name = QLatin1Literal("qbrushtexture-light")
+                       % HexString<int>(light)
+                       % HexString<qint64>(texture.cacheKey());
+
         if (!QPixmapCache::find(name, pixmap)) {
             QImage image = texture.toImage();
@@ -609,5 +614,8 @@
         QPixmap texture = brush.texture();
         QPixmap pixmap;
-        QString name = QString::fromLatin1("qbrushtexture-dark-%1-%2").arg(dark).arg(brush.texture().cacheKey());
+        QString name = QLatin1Literal("qbrushtexture-dark")
+                       % HexString<int>(dark)
+                       % HexString<qint64>(texture.cacheKey());
+
         if (!QPixmapCache::find(name, pixmap)) {
             QImage image = texture.toImage();
@@ -733,6 +741,10 @@
                                        const QColor &gradientStop)
 {
-    QString gradientName;
-    gradientName.sprintf("%dx%d-%x-%x", rect.width(), rect.height(), gradientStart.rgba(), gradientStop.rgba());
+    QString gradientName = QLatin1Literal("qplastique-g")
+                   % HexString<int>(rect.width())
+                   % HexString<int>(rect.height())
+                   % HexString<QRgb>(gradientStart.rgba())
+                   % HexString<QRgb>(gradientStop.rgba());
+
     QPixmap cache;
     QPainter *p = painter;
@@ -981,5 +993,5 @@
     QList<QProgressBar *> bars;
     int progressBarAnimateTimer;
-    QTime timer;
+    QElapsedTimer timer;
 #endif
 };
@@ -1093,12 +1105,4 @@
 
     QColor borderColor = option->palette.background().color().darker(178);
-    QColor gradientStartColor = option->palette.button().color().lighter(104);
-    QColor gradientStopColor = option->palette.button().color().darker(105);
-    QColor highlightedGradientStartColor = option->palette.button().color().lighter(101);
-    QColor highlightedGradientStopColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 85);
-    QColor highlightedBaseGradientStartColor = option->palette.base().color();
-    QColor highlightedBaseGradientStopColor = mergedColors(option->palette.base().color().darker(105), option->palette.highlight().color(), 70);
-    QColor highlightedDarkInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 35);
-    QColor highlightedLightInnerBorderColor = mergedColors(option->palette.button().color(), option->palette.highlight().color(), 58);
     QColor alphaCornerColor;
     if (widget) {
@@ -1108,11 +1112,5 @@
         alphaCornerColor = mergedColors(option->palette.background().color(), borderColor);
     }
-    QColor alphaInnerColor = mergedColors(highlightedLightInnerBorderColor, gradientStartColor);
-    QColor alphaInnerColorNoHover = mergedColors(borderColor, gradientStartColor);
     QColor alphaTextColor = mergedColors(option->palette.background().color(), option->palette.text().color());
-    QColor alphaLightTextColor = mergedColors(option->palette.background().color().lighter(250), option->palette.text().color().lighter(250));
-    QColor lightShadow = option->palette.button().color().lighter(105);
-    QColor shadowGradientStartColor = option->palette.button().color().darker(115);
-    QColor shadow = shadowGradientStartColor;
 
     switch (element) {
@@ -2058,5 +2056,4 @@
 
             int lowerTop = selected ? 0 : 3; // to make the selected tab bigger than the rest
-            QRect adjustedRect;
             bool atEnd = (tab->position == QStyleOptionTab::End) || onlyTab;
             bool atBeginning = ((tab->position == QStyleOptionTab::Beginning) || onlyTab)
@@ -5847,5 +5844,4 @@
 {
     QWindowsStyle::polish(pal);
-    pal.setBrush(QPalette::AlternateBase, pal.base().color().darker(110));
 #ifdef Q_WS_MAC
     pal.setBrush(QPalette::Shadow, Qt::black);
