diff -r b72c6db6890b -r 5dc02b23752f src/gui/styles/qstylehelper.cpp --- a/src/gui/styles/qstylehelper.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/gui/styles/qstylehelper.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -39,8 +39,6 @@ ** ****************************************************************************/ -#include "qstylehelper_p.h" - #include #include #include @@ -54,6 +52,9 @@ #include #endif +#include "qstylehelper_p.h" +#include + QT_BEGIN_NAMESPACE namespace QStyleHelper { @@ -61,17 +62,18 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size) { const QStyleOptionComplex *complexOption = qstyleoption_cast(option); - QString tmp = QString::fromLatin1("%1-%2-%3-%4-%5-%6x%7").arg(key).arg(uint(option->state)).arg(option->direction) - .arg(complexOption ? uint(complexOption->activeSubControls) : uint(0)) - .arg(option->palette.cacheKey()).arg(size.width()).arg(size.height()); + QString tmp = key % HexString(option->state) + % HexString(option->direction) + % HexString(complexOption ? uint(complexOption->activeSubControls) : 0u) + % HexString(option->palette.cacheKey()) + % HexString(size.width()) + % HexString(size.height()); + #ifndef QT_NO_SPINBOX if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast(option)) { - tmp.append(QLatin1Char('-')); - tmp.append(QString::number(spinBox->buttonSymbols)); - tmp.append(QLatin1Char('-')); - tmp.append(QString::number(spinBox->stepEnabled)); - tmp.append(QLatin1Char('-')); - tmp.append(QLatin1Char(spinBox->frame ? '1' : '0')); + tmp = tmp % HexString(spinBox->buttonSymbols) + % HexString(spinBox->stepEnabled) + % QLatin1Char(spinBox->frame ? '1' : '0'); ; } #endif // QT_NO_SPINBOX return tmp;