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/painting/qpaintengine_x11.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)
     
    8080#endif
    8181
     82#include <private/qstylehelper_p.h>
     83
    8284QT_BEGIN_NAMESPACE
    8385
     
    225227{
    226228    QPixmap pm;
    227     QString key = QLatin1String("$qt-alpha-brush$") + QString::number(alpha) + QString::number(screen);
     229    QString key = QLatin1Literal("$qt-alpha-brush$")
     230                  % HexString<uchar>(alpha)
     231                  % HexString<int>(screen);
     232
    228233    if (!QPixmapCache::find(key, pm)) {
    229234        // #### why not use a mono image here????
     
    316321    }
    317322    // none found, replace one
    318     int i = rand() % 16;
     323    int i = qrand() % 16;
    319324
    320325    if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) {
     
    14491454void QX11PaintEngine::drawEllipse(const QRect &rect)
    14501455{
     1456    if (rect.isEmpty()) {
     1457        drawRects(&rect, 1);
     1458        return;
     1459    }
     1460
    14511461    Q_D(QX11PaintEngine);
    14521462    QRect devclip(SHRT_MIN, SHRT_MIN, SHRT_MAX*2 - 1, SHRT_MAX*2 - 1);
     
    19071917
    19081918    QPixmap pixmap = qt_toX11Pixmap(px);
     1919    if(pixmap.isNull())
     1920        return;
    19091921
    19101922    if ((d->xinfo && d->xinfo->screen() != pixmap.x11Info().screen())
Note: See TracChangeset for help on using the changeset viewer.