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/itemviews/qitemdelegate.cpp

    r769 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)
     
    7070#include <qlocale.h>
    7171#include <qdialog.h>
     72#include <qmath.h>
    7273
    7374#include <limits.h>
     
    667668    Q_D(const QItemDelegate);
    668669
    669     QPen pen = painter->pen();
    670670    QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
    671671                              ? QPalette::Normal : QPalette::Disabled;
     
    10241024static QString qPixmapSerial(quint64 i, bool enabled)
    10251025{
    1026     ushort arr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', '0' + enabled };
     1026    ushort arr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', ushort('0' + enabled) };
    10271027    ushort *ptr = &arr[16];
    10281028
     
    11491149    d->textLayout.setFont(font);
    11501150    d->textLayout.setText(QItemDelegatePrivate::replaceNewLine(text));
    1151     const QSize size = d->doTextLayout(rect.width()).toSize();
     1151    QSizeF fpSize = d->doTextLayout(rect.width());
     1152    const QSize size = QSize(qCeil(fpSize.width()), qCeil(fpSize.height()));
    11521153    // ###: textRectangle should take style option as argument
    11531154    const int textMargin = QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1;
Note: See TracChangeset for help on using the changeset viewer.