Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/styles/qstylehelper.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4040****************************************************************************/
    4141
    42 #include "qstylehelper_p.h"
    43 
    4442#include <qstyleoption.h>
    4543#include <qpainter.h>
     
    5553#endif
    5654
     55#include "qstylehelper_p.h"
     56#include <qstringbuilder.h>
     57
    5758QT_BEGIN_NAMESPACE
    5859
     
    6263{
    6364    const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
    64     QString tmp = QString::fromLatin1("%1-%2-%3-%4-%5-%6x%7").arg(key).arg(uint(option->state)).arg(option->direction)
    65                    .arg(complexOption ? uint(complexOption->activeSubControls) : uint(0))
    66                    .arg(option->palette.cacheKey()).arg(size.width()).arg(size.height());
     65    QString tmp = key % HexString<uint>(option->state)
     66                      % HexString<uint>(option->direction)
     67                      % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
     68                      % HexString<quint64>(option->palette.cacheKey())
     69                      % HexString<uint>(size.width())
     70                      % HexString<uint>(size.height());
     71
    6772#ifndef QT_NO_SPINBOX
    6873    if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
    69         tmp.append(QLatin1Char('-'));
    70         tmp.append(QString::number(spinBox->buttonSymbols));
    71         tmp.append(QLatin1Char('-'));
    72         tmp.append(QString::number(spinBox->stepEnabled));
    73         tmp.append(QLatin1Char('-'));
    74         tmp.append(QLatin1Char(spinBox->frame ? '1' : '0'));
     74        tmp = tmp % HexString<uint>(spinBox->buttonSymbols)
     75                  % HexString<uint>(spinBox->stepEnabled)
     76                  % QLatin1Char(spinBox->frame ? '1' : '0'); ;
    7577    }
    7678#endif // QT_NO_SPINBOX
Note: See TracChangeset for help on using the changeset viewer.