summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylehelper.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-15 12:02:43 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-15 12:08:32 (GMT)
commita6782030bc6077b3b1ffe380dfd303cfb7662795 (patch)
treef2fcb24dc0d9df08babe7f87e5ba2a335a0f4b2e /src/gui/styles/qstylehelper.cpp
parent271358459d605e909f4ec093b971a420ff730e8f (diff)
downloadQt-a6782030bc6077b3b1ffe380dfd303cfb7662795.zip
Qt-a6782030bc6077b3b1ffe380dfd303cfb7662795.tar.gz
Qt-a6782030bc6077b3b1ffe380dfd303cfb7662795.tar.bz2
Fix warnings for mingw
did a small refactor and used QStyleHelper::uniqueName in plastique and windows styles
Diffstat (limited to 'src/gui/styles/qstylehelper.cpp')
-rw-r--r--src/gui/styles/qstylehelper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index f9010e8..4877ec4 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -60,11 +60,10 @@ namespace QStyleHelper {
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
{
- QString tmp;
const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
- tmp.sprintf("%s-%d-%d-%lld-%dx%d-%d", key.toLatin1().constData(), uint(option->state),
- complexOption ? uint(complexOption->activeSubControls) : uint(0),
- option->palette.cacheKey(), size.width(), size.height(), option->direction);
+ 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());
#ifndef QT_NO_SPINBOX
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
tmp.append(QLatin1Char('-'));