Changeset 846 for trunk/src/plugins


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:
8 deleted
154 edited
99 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/plugins/accessible/compat/main.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)
  • trunk/src/plugins/accessible/compat/q3complexwidgets.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)
  • trunk/src/plugins/accessible/compat/q3complexwidgets.h

    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)
  • trunk/src/plugins/accessible/compat/q3simplewidgets.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)
  • trunk/src/plugins/accessible/compat/q3simplewidgets.h

    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)
  • trunk/src/plugins/accessible/compat/qaccessiblecompat.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)
  • trunk/src/plugins/accessible/compat/qaccessiblecompat.h

    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)
  • trunk/src/plugins/accessible/widgets/complexwidgets.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)
     
    15131513            break;
    15141514        }
    1515     } else if (child > 0) {
     1515    } else {
    15161516        switch (t) {
    15171517        case Name:
    1518             return qt_accStripAmp(tabBar()->tabText(child - 1));
     1518            if (child > 0)
     1519                return qt_accStripAmp(tabBar()->tabText(child - 1));
     1520            else if (tabBar()->currentIndex() != -1)
     1521                return qt_accStripAmp(tabBar()->tabText(tabBar()->currentIndex()));
     1522            break;
    15191523        default:
    15201524            break;
  • trunk/src/plugins/accessible/widgets/complexwidgets.h

    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)
  • trunk/src/plugins/accessible/widgets/main.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)
  • trunk/src/plugins/accessible/widgets/qaccessiblemenu.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)
  • trunk/src/plugins/accessible/widgets/qaccessiblemenu.h

    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)
  • trunk/src/plugins/accessible/widgets/qaccessiblewidgets.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)
     
    177177    int minimumDistance = INT_MAX;
    178178    QWidget *target = 0;
    179     foreach (QWidget *candidate, candidates.values()) {
     179    foreach (QWidget *candidate, candidates) {
    180180        switch (relation) {
    181181        case QAccessible::Up:
     
    985985{
    986986    if (child) {
    987         if (qobject_cast<QDockWidget *>(child->object()) == dockWidget() && child->role(0) == TitleBar) {
     987        if (child->role(0) == TitleBar) {
    988988            return 1;
    989989        } else {
     
    12151215QObject *QAccessibleTitleBar::object() const
    12161216{
    1217     return m_dockWidget;
     1217    return 0;
    12181218}
    12191219
  • trunk/src/plugins/accessible/widgets/qaccessiblewidgets.h

    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)
  • trunk/src/plugins/accessible/widgets/rangecontrols.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)
  • trunk/src/plugins/accessible/widgets/rangecontrols.h

    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)
  • trunk/src/plugins/accessible/widgets/simplewidgets.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)
     
    603603}
    604604
    605 /*! \reimp */
     605/*! \internal */
    606606QString QAccessibleDisplay::imageDescription()
    607607{
     608#ifndef QT_NO_TOOLTIP
    608609    return widget()->toolTip();
    609 }
    610 
    611 /*! \reimp */
     610#else
     611    return QString::null;
     612#endif
     613}
     614
     615/*! \internal */
    612616QSize QAccessibleDisplay::imageSize()
    613617{
     
    621625}
    622626
    623 /*! \reimp */
     627/*! \internal */
    624628QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType)
    625629{
  • trunk/src/plugins/accessible/widgets/simplewidgets.h

    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)
  • trunk/src/plugins/codecs/cn/main.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)
  • trunk/src/plugins/codecs/cn/qgb18030codec.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)
     
    6161#define Is4thByte(c)        (InRange((c), 0x30, 0x39))
    6262
    63 #define QValidChar(u)        ((u) ? QChar((ushort)(u)) : QChar(QChar::ReplacementCharacter))
     63#define qValidChar(u)        ((u) ? (u) : static_cast<ushort>(QChar::ReplacementCharacter))
    6464
    6565/* User-defined areas:        UDA 1: 0xAAA1 - 0xAFFE (564/0)
     
    161161    uchar buf[4];
    162162    int nbuf = 0;
    163     QChar replacement = QChar::ReplacementCharacter;
     163    ushort replacement = QChar::ReplacementCharacter;
    164164    if (state) {
    165165        if (state->flags & ConvertInvalidToNull)
     
    174174
    175175    QString result;
     176    result.resize(len);
     177    int unicodeLen = 0;
     178    ushort *const resultData = reinterpret_cast<ushort*>(result.data());
    176179    //qDebug("QGb18030Decoder::toUnicode(const char* chars, int len = %d)", len);
    177180    for (int i = 0; i < len; i++) {
     
    181184            if (ch < 0x80) {
    182185                // ASCII
    183                 result += QLatin1Char(ch);
     186                resultData[unicodeLen] = ch;
     187                ++unicodeLen;
    184188            } else if (Is1stByte(ch)) {
    185189                // GB18030?
     
    188192            } else {
    189193                // Invalid
    190                 result += replacement;
     194                resultData[unicodeLen] = replacement;
     195                ++unicodeLen;
    191196                ++invalid;
    192197            }
     
    199204                uint u = qt_Gb18030ToUnicode(buf, clen);
    200205                if (clen == 2) {
    201                     result += QValidChar(u);
     206                    resultData[unicodeLen] = qValidChar(static_cast<ushort>(u));
     207                    ++unicodeLen;
    202208                } else {
    203                     result += replacement;
     209                    resultData[unicodeLen] = replacement;
     210                    ++unicodeLen;
    204211                    ++invalid;
    205212                }
     
    210217            } else {
    211218                // Error
    212                 result += replacement;
     219                resultData[unicodeLen] = replacement;
     220                ++unicodeLen;
    213221                ++invalid;
    214222                nbuf = 0;
     
    221229                nbuf = 3;
    222230            } else {
    223                 result += replacement;
     231                resultData[unicodeLen] = replacement;
     232                ++unicodeLen;
    224233                ++invalid;
    225234                nbuf = 0;
     
    233242                uint u = qt_Gb18030ToUnicode(buf, clen);
    234243                if (clen == 4) {
    235                     result += QValidChar(u);
     244                    resultData[unicodeLen] = qValidChar(u);
     245                    ++unicodeLen;
    236246                } else {
    237                     result += replacement;
     247                    resultData[unicodeLen] = replacement;
     248                    ++unicodeLen;
    238249                    ++invalid;
    239250                }
    240251            } else {
    241                 result += replacement;
     252                resultData[unicodeLen] = replacement;
     253                ++unicodeLen;
    242254                ++invalid;
    243255            }
     
    246258        }
    247259    }
     260    result.resize(unicodeLen);
     261
    248262    if (state) {
    249263        state->remainingChars = nbuf;
     
    306320    uchar buf[2];
    307321    int nbuf = 0;
    308     QChar replacement = QChar::ReplacementCharacter;
     322    ushort replacement = QChar::ReplacementCharacter;
    309323    if (state) {
    310324        if (state->flags & ConvertInvalidToNull)
     
    317331
    318332    QString result;
     333    result.resize(len);
     334    int unicodeLen = 0;
     335    ushort *const resultData = reinterpret_cast<ushort*>(result.data());
    319336
    320337    //qDebug("QGbkDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
     
    325342            if (ch < 0x80) {
    326343                // ASCII
    327                 result += QLatin1Char(ch);
     344                resultData[unicodeLen] = ch;
     345                ++unicodeLen;
    328346            } else if (Is1stByte(ch)) {
    329347                // GBK 1st byte?
     
    332350            } else {
    333351                // Invalid
    334                 result += replacement;
     352                resultData[unicodeLen] = replacement;
     353                ++unicodeLen;
    335354                ++invalid;
    336355            }
     
    343362                uint u = qt_Gb18030ToUnicode(buf, clen);
    344363                if (clen == 2) {
    345                     result += QValidChar(u);
     364                    resultData[unicodeLen] = qValidChar(static_cast<ushort>(u));
     365                    ++unicodeLen;
    346366                } else {
    347                     result += replacement;
     367                    resultData[unicodeLen] = replacement;
     368                    ++unicodeLen;
    348369                    ++invalid;
    349370                }
     
    351372            } else {
    352373                // Error
    353                 result += replacement;
     374                resultData[unicodeLen] = replacement;
     375                ++unicodeLen;
    354376                ++invalid;
    355377                nbuf = 0;
     
    358380        }
    359381    }
     382    result.resize(unicodeLen);
    360383
    361384    if (state) {
     
    446469    uchar buf[2];
    447470    int nbuf = 0;
    448     QChar replacement = QChar::ReplacementCharacter;
     471    ushort replacement = QChar::ReplacementCharacter;
    449472    if (state) {
    450473        if (state->flags & ConvertInvalidToNull)
     
    457480
    458481    QString result;
     482    result.resize(len);
     483    int unicodeLen = 0;
     484    ushort *const resultData = reinterpret_cast<ushort*>(result.data());
    459485    //qDebug("QGb2312Decoder::toUnicode(const char* chars, int len = %d)", len);
    460486    for (int i=0; i<len; i++) {
     
    464490            if (ch < 0x80) {
    465491                // ASCII
    466                 result += QLatin1Char(ch);
     492                resultData[unicodeLen] = ch;
     493                ++unicodeLen;
    467494            } else if (IsByteInGb2312(ch)) {
    468495                // GB2312 1st byte?
     
    471498            } else {
    472499                // Invalid
    473                 result += replacement;
     500                resultData[unicodeLen] = replacement;
     501                ++unicodeLen;
    474502                ++invalid;
    475503            }
     
    482510                uint u = qt_Gb18030ToUnicode(buf, clen);
    483511                if (clen == 2) {
    484                     result += QValidChar(u);
     512                    resultData[unicodeLen] = qValidChar(static_cast<ushort>(u));
     513                    ++unicodeLen;
    485514                } else {
    486                     result += replacement;
     515                    resultData[unicodeLen] = replacement;
     516                    ++unicodeLen;
    487517                    ++invalid;
    488518                }
     
    490520            } else {
    491521                // Error
    492                 result += replacement;
     522                resultData[unicodeLen] = replacement;
     523                ++unicodeLen;
    493524                ++invalid;
    494525                nbuf = 0;
     
    497528        }
    498529    }
     530    result.resize(unicodeLen);
    499531
    500532    if (state) {
  • trunk/src/plugins/codecs/cn/qgb18030codec.h

    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)
  • trunk/src/plugins/codecs/jp/main.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)
  • trunk/src/plugins/codecs/jp/qeucjpcodec.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)
  • trunk/src/plugins/codecs/jp/qeucjpcodec.h

    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)
  • trunk/src/plugins/codecs/jp/qfontjpcodec.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)
  • trunk/src/plugins/codecs/jp/qfontjpcodec.h

    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)
  • trunk/src/plugins/codecs/jp/qjiscodec.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)
  • trunk/src/plugins/codecs/jp/qjiscodec.h

    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)
  • trunk/src/plugins/codecs/jp/qjpunicode.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)
  • trunk/src/plugins/codecs/jp/qjpunicode.h

    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)
  • trunk/src/plugins/codecs/jp/qsjiscodec.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)
  • trunk/src/plugins/codecs/jp/qsjiscodec.h

    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)
  • trunk/src/plugins/codecs/kr/cp949codetbl.h

    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)
  • trunk/src/plugins/codecs/kr/main.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)
  • trunk/src/plugins/codecs/kr/qeuckrcodec.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)
  • trunk/src/plugins/codecs/kr/qeuckrcodec.h

    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)
  • trunk/src/plugins/codecs/tw/main.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)
  • trunk/src/plugins/codecs/tw/qbig5codec.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)
  • trunk/src/plugins/codecs/tw/qbig5codec.h

    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)
  • trunk/src/plugins/decorations/default/main.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)
  • trunk/src/plugins/decorations/styled/main.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)
  • trunk/src/plugins/decorations/windows/main.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)
  • trunk/src/plugins/gfxdrivers/ahi/qscreenahi_qws.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)
  • trunk/src/plugins/gfxdrivers/ahi/qscreenahi_qws.h

    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)
  • trunk/src/plugins/gfxdrivers/ahi/qscreenahiplugin.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)
  • trunk/src/plugins/gfxdrivers/directfb/directfb.pro

    r561 r846  
    1212QMAKE_CXXFLAGS += $$QT_CFLAGS_DIRECTFB
    1313LIBS += $$QT_LIBS_DIRECTFB
    14 DEFINES += $$QT_DEFINES_DIRECTFB QT_DIRECTFB_PLUGIN
     14DEFINES += $$QT_DEFINES_DIRECTFB
    1515contains(gfx-plugins, directfb):DEFINES += QT_QWS_DIRECTFB
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbkeyboard.h

    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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbmouse.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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbmouse.h

    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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h

    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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.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)
     
    5656#include <private/qimagepixmapcleanuphooks_p.h>
    5757
     58
    5859QT_BEGIN_NAMESPACE
    5960
     
    6768        Matrix_BlitsUnsupported = (Matrix_NegativeScale|Matrix_RectsUnsupported)
    6869    };
     70
     71    inline static uint getTransformationType(const QTransform &transform)
     72    {
     73        int ret = transform.type();
     74        if (qMin(transform.m11(), transform.m22()) < 0) {
     75            ret |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale;
     76        }
     77        return ret;
     78    }
    6979
    7080    enum CompositionModeStatus {
     
    99109    inline bool isSimpleBrush(const QBrush &brush) const;
    100110
    101     void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos);
     111    void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos, const QTransform &pixmapTransform);
    102112    void blit(const QRectF &dest, IDirectFBSurface *surface, const QRectF &src);
    103113
     
    113123#endif
    114124
    115     void prepareForBlit(bool alpha);
     125    enum BlitFlag {
     126        HasAlpha = 0x1,
     127        Premultiplied = 0x2
     128    };
     129    void prepareForBlit(uint blitFlags);
    116130
    117131    IDirectFBSurface *surface;
     
    168182#endif
    169183
    170 #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS || defined QT_DEBUG
    171184#define VOID_ARG() static_cast<bool>(false)
    172185enum PaintOperation {
     
    176189    DRAW_POLYGON = 0x0200, DRAW_TEXT = 0x0400, FILL_PATH = 0x0800,
    177190    FILL_RECT = 0x1000, DRAW_COLORSPANS = 0x2000, DRAW_ROUNDED_RECT = 0x4000,
    178     ALL = 0xffff
     191    DRAW_STATICTEXT = 0x8000, ALL = 0xffff
    179192};
    180193
    181 #ifdef QT_DEBUG
    182 static void initRasterFallbacksMasks(int *warningMask, int *disableMask)
    183 {
    184     struct {
    185         const char *name;
    186         PaintOperation operation;
    187     } const operations[] = {
    188         { "DRAW_RECTS", DRAW_RECTS },
    189         { "DRAW_LINES", DRAW_LINES },
    190         { "DRAW_IMAGE", DRAW_IMAGE },
    191         { "DRAW_PIXMAP", DRAW_PIXMAP },
    192         { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP },
    193         { "STROKE_PATH", STROKE_PATH },
    194         { "DRAW_PATH", DRAW_PATH },
    195         { "DRAW_POINTS", DRAW_POINTS },
    196         { "DRAW_ELLIPSE", DRAW_ELLIPSE },
    197         { "DRAW_POLYGON", DRAW_POLYGON },
    198         { "DRAW_TEXT", DRAW_TEXT },
    199         { "FILL_PATH", FILL_PATH },
    200         { "FILL_RECT", FILL_RECT },
    201         { "DRAW_COLORSPANS", DRAW_COLORSPANS },
    202         { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT },
    203         { "ALL", ALL },
    204         { 0, ALL }
    205     };
    206 
    207     QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
    208                                                                                                               QString::SkipEmptyParts);
    209     QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
    210                                                                                                               QString::SkipEmptyParts);
    211     *warningMask = 0;
    212     *disableMask = 0;
    213     if (!warning.isEmpty() || !disable.isEmpty()) {
    214         for (int i=0; operations[i].name; ++i) {
    215             const QString name = QString::fromLatin1(operations[i].name);
    216             int idx = warning.indexOf(name);
    217             if (idx != -1) {
    218                 *warningMask |= operations[i].operation;
    219                 warning.erase(warning.begin() + idx);
    220             }
    221             idx = disable.indexOf(name);
    222             if (idx != -1) {
    223                 *disableMask |= operations[i].operation;
    224                 disable.erase(disable.begin() + idx);
     194enum { RasterWarn = 1, RasterDisable = 2 };
     195static inline uint rasterFallbacksMask(PaintOperation op)
     196{
     197    uint ret = 0;
     198#ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
     199    if (op & QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)
     200        ret |= RasterWarn;
     201#endif
     202#ifdef QT_DIRECTFB_DISABLE_RASTERFALLBACKS
     203    if (op & QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
     204        ret |= RasterDisable;
     205#endif
     206    static int warningMask = -1;
     207    static int disableMask = -1;
     208    if (warningMask < 0) {
     209        struct {
     210            const char *name;
     211            PaintOperation operation;
     212        } const operations[] = {
     213            { "DRAW_RECTS", DRAW_RECTS },
     214            { "DRAW_LINES", DRAW_LINES },
     215            { "DRAW_IMAGE", DRAW_IMAGE },
     216            { "DRAW_PIXMAP", DRAW_PIXMAP },
     217            { "DRAW_TILED_PIXMAP", DRAW_TILED_PIXMAP },
     218            { "STROKE_PATH", STROKE_PATH },
     219            { "DRAW_PATH", DRAW_PATH },
     220            { "DRAW_POINTS", DRAW_POINTS },
     221            { "DRAW_ELLIPSE", DRAW_ELLIPSE },
     222            { "DRAW_POLYGON", DRAW_POLYGON },
     223            { "DRAW_TEXT", DRAW_TEXT },
     224            { "FILL_PATH", FILL_PATH },
     225            { "FILL_RECT", FILL_RECT },
     226            { "DRAW_COLORSPANS", DRAW_COLORSPANS },
     227            { "DRAW_ROUNDED_RECT", DRAW_ROUNDED_RECT },
     228            { "ALL", ALL },
     229            { 0, ALL }
     230        };
     231
     232        QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
     233                                                                                                                  QString::SkipEmptyParts);
     234        QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
     235                                                                                                                  QString::SkipEmptyParts);
     236        warningMask = 0;
     237        disableMask = 0;
     238        if (!warning.isEmpty() || !disable.isEmpty()) {
     239            for (int i=0; operations[i].name; ++i) {
     240                const QString name = QString::fromLatin1(operations[i].name);
     241                int idx = warning.indexOf(name);
     242                if (idx != -1) {
     243                    warningMask |= operations[i].operation;
     244                    warning.erase(warning.begin() + idx);
     245                }
     246                idx = disable.indexOf(name);
     247                if (idx != -1) {
     248                    disableMask |= operations[i].operation;
     249                    disable.erase(disable.begin() + idx);
     250                }
    225251            }
    226252        }
    227     }
    228     if (!warning.isEmpty()) {
    229         qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
    230                  qPrintable(warning.join(QLatin1String("|"))));
    231     }
    232     if (!disable.isEmpty()) {
    233         qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
    234                  qPrintable(disable.join(QLatin1String("|"))));
    235     }
    236 
    237 }
    238 #endif
    239 
    240 static inline int rasterFallbacksMask(bool warn)
    241 {
    242 #ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
    243     if (warn)
    244         return QT_DIRECTFB_WARN_ON_RASTERFALLBACKS;
    245 #endif
    246 #ifdef QT_DIRECTFB_DISABLE_RASTERFALLBACKS
    247     if (!warn)
    248         return QT_DIRECTFB_DISABLE_RASTERFALLBACKS;
    249 #endif
    250 #ifndef QT_DEBUG
    251     return 0;
    252 #else
    253     static int warnMask = -1;
    254     static int disableMask = -1;
    255     if (warnMask == -1)
    256         initRasterFallbacksMasks(&warnMask, &disableMask);
    257     return warn ? warnMask : disableMask;
    258 #endif
    259 }
    260 #endif
    261 
    262 #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
     253        if (!warning.isEmpty()) {
     254            qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
     255                     qPrintable(warning.join(QLatin1String("|"))));
     256        }
     257        if (!disable.isEmpty()) {
     258            qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
     259                     qPrintable(disable.join(QLatin1String("|"))));
     260        }
     261    }
     262    if (op & warningMask)
     263        ret |= RasterWarn;
     264    if (op & disableMask)
     265        ret |= RasterDisable;
     266    return ret;
     267}
     268
    263269template <typename device, typename T1, typename T2, typename T3>
    264270static void rasterFallbackWarn(const char *msg, const char *func, const device *dev,
     
    268274                               const char *nameTwo, const T2 &two,
    269275                               const char *nameThree, const T3 &three);
    270 #endif
    271 
    272 #if defined QT_DEBUG || (defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS && defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
     276
    273277#define RASTERFALLBACK(op, one, two, three)                             \
    274278    {                                                                   \
    275         const bool disable = op & rasterFallbacksMask(false);           \
    276         if (op & rasterFallbacksMask(true))                             \
    277             rasterFallbackWarn(disable                                  \
    278                                ? "Disabled raster engine operation"     \
    279                                : "Falling back to raster engine for",   \
     279        static const uint rasterFallbacks = rasterFallbacksMask(op);    \
     280        switch (rasterFallbacks) {                                      \
     281        case 0: break;                                                  \
     282        case RasterWarn:                                                \
     283            rasterFallbackWarn("Falling back to raster engine for",     \
    280284                               __FUNCTION__,                            \
    281285                               state()->painter->device(),              \
     
    285289                               d_func()->compositionModeStatus,         \
    286290                               #one, one, #two, two, #three, three);    \
    287         if (disable)                                                    \
     291            break;                                                      \
     292        case RasterDisable|RasterWarn:                                  \
     293            rasterFallbackWarn("Disabled raster engine operation",      \
     294                               __FUNCTION__,                            \
     295                               state()->painter->device(),              \
     296                               d_func()->transformationType,            \
     297                               d_func()->simplePen,                     \
     298                               d_func()->clipType,                      \
     299                               d_func()->compositionModeStatus,         \
     300                               #one, one, #two, two, #three, three);    \
     301        case RasterDisable:                                             \
    288302            return;                                                     \
    289     }
    290 #elif defined QT_DIRECTFB_DISABLE_RASTERFALLBACKS
    291 #define RASTERFALLBACK(op, one, two, three)                             \
    292     if (op & rasterFallbacksMask(false))                                \
    293         return;
    294 #elif defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
    295 #define RASTERFALLBACK(op, one, two, three)                             \
    296     if (op & rasterFallbacksMask(true))                                 \
    297         rasterFallbackWarn("Falling back to raster engine for",         \
    298                            __FUNCTION__, state()->painter->device(),    \
    299                            d_func()->transformationType,                \
    300                            d_func()->simplePen,                         \
    301                            d_func()->clipType,                          \
    302                            d_func()->compositionModeStatus,             \
    303                            #one, one, #two, two, #three, three);
    304 #else
    305 #define RASTERFALLBACK(op, one, two, three)
    306 #endif
     303        }                                                               \
     304    }
    307305
    308306template <class T>
     
    633631    bool release;
    634632    IDirectFBSurface *imgSurface = d->getSurface(image, &release);
    635     d->prepareForBlit(QDirectFBScreen::hasAlphaChannel(imgSurface));
     633    uint blitFlags = 0;
     634    if (image.hasAlphaChannel())
     635        blitFlags |= QDirectFBPaintEnginePrivate::HasAlpha;
     636    if (QDirectFBScreen::isPremultiplied(image.format()))
     637        blitFlags |= QDirectFBPaintEnginePrivate::Premultiplied;
     638    d->prepareForBlit(blitFlags);
    636639    CLIPPED_PAINT(d->blit(r, imgSurface, sr));
    637640    if (release) {
     
    672675        } else {
    673676            QDirectFBPaintEnginePrivate::unlock(dfbData);
    674             d->prepareForBlit(pixmap.hasAlphaChannel());
    675677            IDirectFBSurface *s = dfbData->directFBSurface();
     678            uint blitFlags = 0;
     679            if (pixmap.hasAlphaChannel())
     680                blitFlags |= QDirectFBPaintEnginePrivate::HasAlpha;
     681            if (QDirectFBScreen::isPremultiplied(dfbData->pixelFormat()))
     682                blitFlags |= QDirectFBPaintEnginePrivate::Premultiplied;
     683
     684            d->prepareForBlit(blitFlags);
    676685            CLIPPED_PAINT(d->blit(r, s, sr));
    677686        }
     
    708717        QRasterPaintEngine::drawTiledPixmap(r, pix, offset);
    709718    } else {
    710         CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset));
     719        QTransform transform(state()->matrix);
     720        CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset, transform));
    711721    }
    712722}
     
    796806    d->lock();
    797807    QRasterPaintEngine::drawRoundedRect(rect, xrad, yrad, mode);
     808}
     809
     810void QDirectFBPaintEngine::drawStaticTextItem(QStaticTextItem *item)
     811{
     812    RASTERFALLBACK(DRAW_STATICTEXT, item, VOID_ARG(), VOID_ARG());
     813    Q_D(QDirectFBPaintEngine);
     814    d->lock();
     815    QRasterPaintEngine::drawStaticTextItem(item);
    798816}
    799817
     
    820838
    821839        case Qt::TexturePattern: {
     840            const QPointF &brushOrigin = state()->brushOrigin;
     841            const QTransform stateTransform = state()->matrix;
     842            QTransform transform(stateTransform);
     843            transform.translate(brushOrigin.x(), brushOrigin.y());
     844            transform = brush.transform() * transform;
    822845            if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)
    823                 || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
    824                 || (!d->supportsStretchBlit() && state()->matrix.isScaling())) {
     846                || (QDirectFBPaintEnginePrivate::getTransformationType(transform) & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)
     847                || (!d->supportsStretchBlit() && transform.isScaling())) {
    825848                break;
    826849            }
     
    830853                break;
    831854
    832             CLIPPED_PAINT(d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin));
     855            CLIPPED_PAINT(d->drawTiledPixmap(stateTransform.mapRect(rect), texture, rect.topLeft() - brushOrigin, transform));
    833856            return; }
    834857        default:
     
    941964void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform)
    942965{
    943     transformationType = transform.type();
    944     if (qMin(transform.m11(), transform.m22()) < 0) {
    945         transformationType |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale;
    946     }
     966    transformationType = getTransformationType(transform);
    947967    setPen(q->state()->pen);
    948968}
     
    10401060}
    10411061
    1042 void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha)
    1043 {
    1044     DFBSurfaceBlittingFlags blittingFlags = alpha ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX;
     1062void QDirectFBPaintEnginePrivate::prepareForBlit(uint flags)
     1063{
     1064    DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX;
     1065    if (flags & Premultiplied)
     1066        blittingFlags |= DSBLIT_SRC_PREMULTIPLY;
     1067    if (flags & HasAlpha)
     1068        blittingFlags |= DSBLIT_BLEND_ALPHACHANNEL;
    10451069    if (opacity != 255) {
    10461070        blittingFlags |= DSBLIT_BLEND_COLORALPHA;
    1047     }
    1048     surface->SetColor(surface, 0xff, 0xff, 0xff, opacity);
     1071        surface->SetColor(surface, 0xff, 0xff, 0xff, opacity);
     1072    }
     1073
    10491074    surface->SetBlittingFlags(surface, blittingFlags);
    10501075}
     
    11411166}
    11421167
    1143 void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off)
    1144 {
    1145     Q_ASSERT(!(transformationType & Matrix_BlitsUnsupported));
     1168void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap,
     1169                                                  const QPointF &off, const QTransform &pixmapTransform)
     1170{
    11461171    const QTransform &transform = q->state()->matrix;
     1172    Q_ASSERT(!(getTransformationType(transform) & Matrix_BlitsUnsupported) &&
     1173             !(getTransformationType(pixmapTransform) & Matrix_BlitsUnsupported));
    11471174    const QRect destinationRect = transform.mapRect(dest).toRect().normalized();
    11481175    QRect newClip = destinationRect;
     
    11611188    surface->SetClip(surface, &clip);
    11621189
    1163     QPointF offset = off;
     1190    QPointF offset = pixmapTransform.inverted().map(off);
    11641191    Q_ASSERT(transform.type() <= QTransform::TxScale);
    1165     prepareForBlit(pixmap.hasAlphaChannel());
    11661192    QPixmapData *data = pixmap.pixmapData();
    11671193    Q_ASSERT(data->classId() == QPixmapData::DirectFBClass);
    11681194    QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data);
     1195    IDirectFBSurface *sourceSurface = dfbData->directFBSurface();
     1196    uint blitFlags = 0;
     1197    if (dfbData->hasAlphaChannel())
     1198        blitFlags |= HasAlpha;
     1199    if (QDirectFBScreen::isPremultiplied(dfbData->pixelFormat()))
     1200        blitFlags |= Premultiplied;
     1201    prepareForBlit(blitFlags);
    11691202    QDirectFBPaintEnginePrivate::unlock(dfbData);
    11701203    const QSize pixmapSize = dfbData->size();
    1171     IDirectFBSurface *sourceSurface = dfbData->directFBSurface();
    1172     if (transform.isScaling()) {
     1204    if (transform.isScaling() || pixmapTransform.isScaling()) {
    11731205        Q_ASSERT(supportsStretchBlit());
    11741206        Q_ASSERT(qMin(transform.m11(), transform.m22()) >= 0);
     
    11761208        offset.ry() *= transform.m22();
    11771209
    1178         const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22());
     1210        const QSizeF mappedSize(pixmapSize.width() * pixmapTransform.m11(), pixmapSize.height() * pixmapTransform.m22());
    11791211        qreal y = fixCoord(destinationRect.y(), mappedSize.height(), offset.y());
    11801212        const qreal startX = fixCoord(destinationRect.x(), mappedSize.width(), offset.x());
     
    13551387}
    13561388
    1357 #if defined QT_DIRECTFB_WARN_ON_RASTERFALLBACKS || defined QT_DEBUG
    13581389template <typename T> inline const T *ptr(const T &t) { return &t; }
    13591390template <> inline const bool* ptr<bool>(const bool &) { return 0; }
     
    13961427}
    13971428
    1398 #endif // QT_DIRECTFB_WARN_ON_RASTERFALLBACKS
    1399 
    14001429QT_END_NAMESPACE
    14011430
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h

    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)
     
    110110    virtual void clip(const QRect &rect, Qt::ClipOperation op);
    111111
     112    virtual void drawStaticTextItem(QStaticTextItem *item);
     113
    112114    static void initImageCache(int size);
    113115};
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.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)
     
    9292}
    9393
     94#ifdef QT_DIRECTFB_OPAQUE_DETECTION
    9495// mostly duplicated from qimage.cpp (QImageData::checkForAlphaPixels)
    9596static bool checkForAlphaPixels(const QImage &img)
     
    161162    return false;
    162163}
    163 
    164 bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img)
    165 {
    166 #ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
    167     return checkForAlphaPixels(img);
     164#endif // QT_DIRECTFB_OPAQUE_DETECTION
     165
     166bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img, Qt::ImageConversionFlags flags)
     167{
     168    if (img.depth() == 1)
     169        return true;
     170#ifdef QT_DIRECTFB_OPAQUE_DETECTION
     171    return ((flags & Qt::NoOpaqueDetection) ? img.hasAlphaChannel() : checkForAlphaPixels(img));
    168172#else
     173    Q_UNUSED(flags);
    169174    return img.hasAlphaChannel();
    170175#endif
     
    247252    QDirectFBPointer<IDirectFBImageProvider> provider(providerPtr);
    248253
    249     DFBSurfaceDescription surfaceDescription;
    250     if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) {
    251         DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result);
    252         return false;
    253     }
    254 
    255254    DFBImageDescription imageDescription;
    256255    result = provider->GetImageDescription(provider.data(), &imageDescription);
     
    260259    }
    261260
    262     alpha = imageDescription.caps & (DICAPS_ALPHACHANNEL|DICAPS_COLORKEY);
     261    if (imageDescription.caps & DICAPS_COLORKEY) {
     262        return false;
     263    }
     264
     265    DFBSurfaceDescription surfaceDescription;
     266    if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) {
     267        DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result);
     268        return false;
     269    }
     270
     271    alpha = imageDescription.caps & DICAPS_ALPHACHANNEL;
    263272    imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
    264273
     
    288297#endif
    289298
    290 void QDirectFBPixmapData::fromImage(const QImage &img,
    291                                     Qt::ImageConversionFlags flags)
    292 {
    293     if (img.depth() == 1) {
    294         alpha = true;
    295 #ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION
    296     } else if (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img)) {
    297         alpha = true;
    298 #else
    299     } else if (img.hasAlphaChannel()) {
    300         alpha = true;
    301 #endif
    302     }
     299void QDirectFBPixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags flags)
     300{
     301    alpha = QDirectFBPixmapData::hasAlphaChannel(img, flags);
    303302    imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
    304303    QImage image;
     
    591590}
    592591
    593 #ifndef QT_DIRECTFB_PLUGIN
    594592Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap)
    595593{
     
    600598    return dfbData->directFBSurface();
    601599}
    602 #endif
    603600
    604601QT_END_NAMESPACE
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h

    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)
     
    8787
    8888    inline QImage::Format pixelFormat() const { return imageFormat; }
    89     static bool hasAlphaChannel(const QImage &img);
    9089    inline bool hasAlphaChannel() const { return alpha; }
     90    static bool hasAlphaChannel(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
    9191private:
    9292#ifdef QT_DIRECTFB_IMAGEPROVIDER
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.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)
     
    15551555        }
    15561556    }
    1557     if (!region.isEmpty()) {
    1558         solidFill(d_ptr->backgroundColor, region);
    1559     }
     1557
     1558    solidFill(d_ptr->backgroundColor, region);
    15601559
    15611560    while (idx > 0) {
     
    16301629    Q_UNUSED(region);
    16311630#else
     1631    QDirectFBScreen::solidFill(d_ptr->primarySurface, color, region);
     1632#endif
     1633}
     1634
     1635static inline void clearRect(IDirectFBSurface *surface, const QColor &color, const QRect &rect)
     1636{
     1637    Q_ASSERT(surface);
     1638    const DFBRegion region = { rect.left(), rect.top(), rect.right(), rect.bottom() };
     1639    // could just reinterpret_cast this to a DFBRegion
     1640    surface->SetClip(surface, &region);
     1641    surface->Clear(surface, color.red(), color.green(), color.blue(), color.alpha());
     1642}
     1643
     1644void QDirectFBScreen::solidFill(IDirectFBSurface *surface, const QColor &color, const QRegion &region)
     1645{
    16321646    if (region.isEmpty())
    16331647        return;
    16341648
    1635     d_ptr->primarySurface->SetColor(d_ptr->primarySurface,
    1636                                     color.red(), color.green(), color.blue(),
    1637                                     color.alpha());
    16381649    const int n = region.rectCount();
    16391650    if (n == 1) {
    1640         const QRect r = region.boundingRect();
    1641         d_ptr->primarySurface->FillRectangle(d_ptr->primarySurface, r.x(), r.y(), r.width(), r.height());
     1651        clearRect(surface, color, region.boundingRect());
    16421652    } else {
    16431653        const QVector<QRect> rects = region.rects();
    1644         QVarLengthArray<DFBRectangle, 32> rectArray(n);
    16451654        for (int i=0; i<n; ++i) {
    1646             const QRect &r = rects.at(i);
    1647             rectArray[i].x = r.x();
    1648             rectArray[i].y = r.y();
    1649             rectArray[i].w = r.width();
    1650             rectArray[i].h = r.height();
    1651         }
    1652         d_ptr->primarySurface->FillRectangles(d_ptr->primarySurface, rectArray.constData(), n);
    1653     }
    1654 #endif
     1655            clearRect(surface, color, rects.at(i));
     1656        }
     1657    }
     1658    surface->SetClip(surface, 0);
    16551659}
    16561660
     
    17911795#endif
    17921796
    1793 #ifndef QT_DIRECTFB_PLUGIN
    17941797Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_widget(const QWidget *widget, QRect *rect)
    17951798{
     
    18091812
    18101813#endif
    1811 #endif
    18121814
    18131815QT_END_NAMESPACE
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h

    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)
     
    160160    void exposeRegion(QRegion r, int changing);
    161161    void solidFill(const QColor &color, const QRegion &region);
     162    static void solidFill(IDirectFBSurface *surface, const QColor &color, const QRegion &region);   
    162163
    163164    void setMode(int width, int height, int depth);
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreenplugin.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)
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.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)
     
    345345        return;
    346346
     347#ifndef QT_NO_QWS_PROXYSCREEN
    347348    QWExtra *extra = qt_widget_private(widget)->extraData();
    348349    if (extra && extra->proxyWidget)
    349350        return;
     351#endif
    350352
    351353    const quint8 windowOpacity = quint8(win->windowOpacity() * 0xff);
     
    381383}
    382384
    383 void QDirectFBWindowSurface::beginPaint(const QRegion &)
     385void QDirectFBWindowSurface::beginPaint(const QRegion &region)
    384386{
    385387    if (!engine) {
    386388        engine = new QDirectFBPaintEngine(this);
     389    }
     390
     391    if (dfbSurface) {
     392        const QWidget *win = window();
     393        if (win && win->testAttribute(Qt::WA_NoSystemBackground)) {
     394            QDirectFBScreen::solidFill(dfbSurface, Qt::transparent, region);
     395        }
    387396    }
    388397    flushPending = true;
  • trunk/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.h

    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)
  • trunk/src/plugins/gfxdrivers/linuxfb/main.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)
  • trunk/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.c

    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)
     
    9696    height = var.yres;
    9797    bytesPerPixel = var.bits_per_pixel / 8;
    98     stride = var.xres * bytesPerPixel;
     98    stride = fix.line_length;
    9999    format = PVR2D_1BPP;
    100100    if (var.bits_per_pixel == 16) {
  • trunk/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable.h

    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)
  • trunk/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwsdrawable_p.h

    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)
  • trunk/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c

    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)
  • trunk/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.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)
  • trunk/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.h

    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)
  • trunk/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreenplugin.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)
  • trunk/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.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)
  • trunk/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.h

    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)
  • trunk/src/plugins/gfxdrivers/qvfb/main.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)
  • trunk/src/plugins/gfxdrivers/transformed/main.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)
  • trunk/src/plugins/gfxdrivers/vnc/main.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)
  • trunk/src/plugins/gfxdrivers/vnc/qscreenvnc_p.h

    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)
  • trunk/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.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)
     
    10541054    QRfbClientCutText ev;
    10551055
    1056     if (ev.read(client)) {
     1056    if (cutTextPending == 0 && ev.read(client)) {
    10571057        cutTextPending = ev.length;
    10581058        if (!cutTextPending)
     
    14821482            if (count & 0x1) {
    14831483                const quint16 *src16 = reinterpret_cast<const quint16*>(src);
    1484                 dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]);
     1484                *dst32 = qt_conv16ToRgb(src16[count - 1]);
    14851485            }
    14861486            return;
     
    20392039    qvnc_cursor = 0;
    20402040#endif
    2041     if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting)
     2041    if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting && QWSServer::instance())
    20422042        QWSServer::instance()->enablePainting(false);
    20432043}
  • trunk/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.h

    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)
  • trunk/src/plugins/graphicssystems/graphicssystems.pro

    r561 r846  
    88    !win32:!embedded:!mac:SUBDIRS += shivavg
    99}
     10
     11!win32:!embedded:!mac:!symbian:CONFIG += x11
     12
     13x11:contains(QT_CONFIG, opengles2):contains(QT_CONFIG, egl):SUBDIRS += meego
  • trunk/src/plugins/graphicssystems/opengl/main.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)
     
    5757    QStringList list;
    5858    list << QLatin1String("OpenGL") << QLatin1String("OpenGL1");
    59 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
     59#if !defined(QT_OPENGL_ES_1)
    6060    list << QLatin1String("OpenGL2");
     61#endif
     62#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
     63    list << QLatin1String("X11GL");
    6164#endif
    6265    return list;
     
    6770    if (system.toLower() == QLatin1String("opengl1")) {
    6871        QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
    69         return new QGLGraphicsSystem;
     72        return new QGLGraphicsSystem(false);
    7073    }
    7174
    72 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
     75#if !defined(QT_OPENGL_ES_1)
    7376    if (system.toLower() == QLatin1String("opengl2")) {
    7477        QGL::setPreferredPaintEngine(QPaintEngine::OpenGL2);
    75         return new QGLGraphicsSystem;
     78        return new QGLGraphicsSystem(false);
    7679    }
    7780#endif
    7881
     82#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
     83    if (system.toLower() == QLatin1String("x11gl"))
     84        return new QGLGraphicsSystem(true);
     85#endif
     86
    7987    if (system.toLower() == QLatin1String("opengl"))
    80         return new QGLGraphicsSystem;
     88        return new QGLGraphicsSystem(false);
    8189
    8290    return 0;
  • trunk/src/plugins/graphicssystems/opengl/opengl.pro

    r597 r846  
    1111target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
    1212INSTALLS += target
     13
     14symbian: TARGET.UID3 = 0x2002131B
  • trunk/src/plugins/graphicssystems/openvg/main.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)
  • trunk/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.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)
     
    4343#include <QtOpenVG/private/qpixmapdata_vg_p.h>
    4444#include <QtOpenVG/private/qwindowsurface_vg_p.h>
     45#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
     46#include <QtGui/private/qwidget_p.h>
     47#endif
     48#include <QtGui/private/qapplication_p.h>
    4549
    4650QT_BEGIN_NAMESPACE
     
    4852QVGGraphicsSystem::QVGGraphicsSystem()
    4953{
     54    QApplicationPrivate::graphics_system_name = QLatin1String("openvg");
    5055}
    5156
     
    6570QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const
    6671{
     72#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
     73    QWidgetPrivate *d = qt_widget_private(widget);
     74    if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
     75        return d->createDefaultWindowSurface_sys();
     76#endif
    6777    return new QVGWindowSurface(widget);
    6878}
  • trunk/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h

    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)
  • trunk/src/plugins/graphicssystems/shivavg/main.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)
  • trunk/src/plugins/graphicssystems/shivavg/shivavggraphicssystem.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)
  • trunk/src/plugins/graphicssystems/shivavg/shivavggraphicssystem.h

    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)
  • trunk/src/plugins/graphicssystems/shivavg/shivavgwindowsurface.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)
  • trunk/src/plugins/graphicssystems/shivavg/shivavgwindowsurface.h

    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)
  • trunk/src/plugins/graphicssystems/trace/main.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)
  • trunk/src/plugins/graphicssystems/trace/qgraphicssystem_trace.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)
     
    8383        if (outputFile.open(QIODevice::WriteOnly)) {
    8484            QDataStream out(&outputFile);
    85             out.writeBytes("qttrace", 7);
    86             out << *buffer << updates;
     85            out.setFloatingPointPrecision(QDataStream::SinglePrecision);
     86
     87            out.writeBytes("qttraceV2", 9);
     88
     89            uint version = 1;
     90
     91            out << version << *buffer << updates;
    8792        }
    8893        delete buffer;
  • trunk/src/plugins/graphicssystems/trace/qgraphicssystem_trace_p.h

    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)
  • trunk/src/plugins/graphicssystems/trace/trace.pro

    r597 r846  
    66
    77QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
     8symbian:TARGET.UID3 = 0x2002130E
    89
    910SOURCES = main.cpp qgraphicssystem_trace.cpp
  • trunk/src/plugins/iconengines/svgiconengine/main.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)
  • trunk/src/plugins/iconengines/svgiconengine/qsvgiconengine.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)
  • trunk/src/plugins/iconengines/svgiconengine/qsvgiconengine.h

    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)
  • trunk/src/plugins/imageformats/gif/gif.pro

    r561 r846  
    22include(../../qpluginbase.pri)
    33
    4 HEADERS += qgifhandler.h
    5 SOURCES += main.cpp \
    6            qgifhandler.cpp
     4include(../../../gui/image/qgifhandler.pri)
     5SOURCES += $$PWD/main.cpp
    76
    87QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
  • trunk/src/plugins/imageformats/gif/main.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)
     
    4848#undef QT_NO_IMAGEFORMAT_GIF
    4949#endif
    50 #include "qgifhandler.h"
     50#include <qgifhandler_p.h>
    5151
    5252QT_BEGIN_NAMESPACE
  • trunk/src/plugins/imageformats/ico/main.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)
  • trunk/src/plugins/imageformats/ico/qicohandler.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)
     
    5555#include <QtCore/QBuffer>
    5656#include <qvariant.h>
     57
     58QT_BEGIN_NAMESPACE
     59
    5760// These next two structs represent how the icon information is stored
    5861// in an ICO file.
     
    557560                else                    // # colors used
    558561                    icoAttrib.ncolors = header.biClrUsed ? header.biClrUsed : 1 << icoAttrib.nbits;
     562                if (icoAttrib.ncolors > 256) //color table can't be more than 256
     563                    return img;
    559564                icoAttrib.w = iconEntry.bWidth;
    560565                if (icoAttrib.w == 0)
     
    892897}
    893898
     899QT_END_NAMESPACE
  • trunk/src/plugins/imageformats/ico/qicohandler.h

    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)
     
    4444#include <QtGui/QImageIOHandler>
    4545
     46QT_BEGIN_NAMESPACE
     47
    4648class ICOReader;
    4749class QtIcoHandler: public QImageIOHandler
     
    7274};
    7375
     76QT_END_NAMESPACE
     77
    7478#endif /* QTICOHANDLER_H */
    7579
  • trunk/src/plugins/imageformats/imageformats.pro

    r2 r846  
    11TEMPLATE = subdirs
    22
    3 !contains(QT_CONFIG, no-jpeg):SUBDIRS += jpeg
    4 !contains(QT_CONFIG, no-gif):SUBDIRS += gif
    5 !contains(QT_CONFIG, no-mng):SUBDIRS += mng
     3!contains(QT_CONFIG, no-jpeg):!contains(QT_CONFIG, jpeg):SUBDIRS += jpeg
     4!contains(QT_CONFIG, no-gif):!contains(QT_CONFIG, gif):SUBDIRS += gif
     5!contains(QT_CONFIG, no-mng):!contains(QT_CONFIG, mng):SUBDIRS += mng
    66contains(QT_CONFIG, svg):SUBDIRS += svg
    7 !contains(QT_CONFIG, no-tiff):SUBDIRS += tiff
     7!contains(QT_CONFIG, no-tiff):!contains(QT_CONFIG, tiff):SUBDIRS += tiff
    88!contains(QT_CONFIG, no-ico):SUBDIRS += ico
  • trunk/src/plugins/imageformats/jpeg/jpeg.pro

    r561 r846  
    44QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
    55
    6 HEADERS += qjpeghandler.h
    7 SOURCES += main.cpp \
    8            qjpeghandler.cpp
    9 
    10 wince*: {
    11         DEFINES += NO_GETENV
    12         contains(CE_ARCH,x86):CONFIG -= stl exceptions
    13         contains(CE_ARCH,x86):CONFIG += exceptions_off
    14 }
    15 
    16 symbian: {
    17         #Disable warnings in 3rdparty code due to unused arguments
    18         QMAKE_CXXFLAGS.CW += -W nounusedarg
    19         TARGET.UID3=0x2001E61B
    20 }
    21 
    22 contains(QT_CONFIG, system-jpeg) {
    23         unix:LIBS += -ljpeg
    24         win32:LIBS += libjpeg.lib
    25 }
    26 !contains(QT_CONFIG, system-jpeg) {
    27         INCLUDEPATH += ../../../3rdparty/libjpeg
    28         SOURCES  += \
    29             ../../../3rdparty/libjpeg/jcapimin.c \
    30             ../../../3rdparty/libjpeg/jcapistd.c \
    31             ../../../3rdparty/libjpeg/jccoefct.c \
    32             ../../../3rdparty/libjpeg/jccolor.c \
    33             ../../../3rdparty/libjpeg/jcdctmgr.c \
    34             ../../../3rdparty/libjpeg/jchuff.c \
    35             ../../../3rdparty/libjpeg/jcinit.c \
    36             ../../../3rdparty/libjpeg/jcmainct.c \
    37             ../../../3rdparty/libjpeg/jcmarker.c \
    38             ../../../3rdparty/libjpeg/jcmaster.c \
    39             ../../../3rdparty/libjpeg/jcomapi.c \
    40             ../../../3rdparty/libjpeg/jcparam.c \
    41             ../../../3rdparty/libjpeg/jcphuff.c \
    42             ../../../3rdparty/libjpeg/jcprepct.c \
    43             ../../../3rdparty/libjpeg/jcsample.c \
    44             ../../../3rdparty/libjpeg/jctrans.c \
    45             ../../../3rdparty/libjpeg/jdapimin.c \
    46             ../../../3rdparty/libjpeg/jdapistd.c \
    47             ../../../3rdparty/libjpeg/jdatadst.c \
    48             ../../../3rdparty/libjpeg/jdatasrc.c \
    49             ../../../3rdparty/libjpeg/jdcoefct.c \
    50             ../../../3rdparty/libjpeg/jdcolor.c \
    51             ../../../3rdparty/libjpeg/jddctmgr.c \
    52             ../../../3rdparty/libjpeg/jdhuff.c \
    53             ../../../3rdparty/libjpeg/jdinput.c \
    54             ../../../3rdparty/libjpeg/jdmainct.c \
    55             ../../../3rdparty/libjpeg/jdmarker.c \
    56             ../../../3rdparty/libjpeg/jdmaster.c \
    57             ../../../3rdparty/libjpeg/jdmerge.c \
    58             ../../../3rdparty/libjpeg/jdphuff.c \
    59             ../../../3rdparty/libjpeg/jdpostct.c \
    60             ../../../3rdparty/libjpeg/jdsample.c \
    61             ../../../3rdparty/libjpeg/jdtrans.c \
    62             ../../../3rdparty/libjpeg/jerror.c \
    63             ../../../3rdparty/libjpeg/jfdctflt.c \
    64             ../../../3rdparty/libjpeg/jfdctfst.c \
    65             ../../../3rdparty/libjpeg/jfdctint.c \
    66             ../../../3rdparty/libjpeg/jidctflt.c \
    67             ../../../3rdparty/libjpeg/jidctfst.c \
    68             ../../../3rdparty/libjpeg/jidctint.c \
    69             ../../../3rdparty/libjpeg/jidctred.c \
    70             ../../../3rdparty/libjpeg/jmemmgr.c \
    71             ../../../3rdparty/libjpeg/jquant1.c \
    72             ../../../3rdparty/libjpeg/jquant2.c \
    73             ../../../3rdparty/libjpeg/jutils.c \
    74             ../../../3rdparty/libjpeg/jmemnobs.c
    75 }
     6include(../../../gui/image/qjpeghandler.pri)
     7SOURCES += main.cpp
    768
    779QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
    7810target.path += $$[QT_INSTALL_PLUGINS]/imageformats
    7911INSTALLS += target
    80 
  • trunk/src/plugins/imageformats/jpeg/main.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)
     
    4848#undef QT_NO_IMAGEFORMAT_JPEG
    4949#endif
    50 #include "qjpeghandler.h"
     50#include <qjpeghandler_p.h>
    5151
    5252QT_BEGIN_NAMESPACE
  • trunk/src/plugins/imageformats/mng/main.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)
     
    4848#undef QT_NO_IMAGEFORMAT_MNG
    4949#endif
    50 #include "qmnghandler.h"
     50#include <qmnghandler_p.h>
    5151
    5252#include <qiodevice.h>
  • trunk/src/plugins/imageformats/mng/mng.pro

    r561 r846  
    33
    44QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-mng)"
    5 
    6 HEADERS += qmnghandler.h
    7 SOURCES += main.cpp \
    8            qmnghandler.cpp
    95
    106symbian: {
     
    1410}
    1511
    16 contains(QT_CONFIG, system-mng) {
    17         unix:LIBS += -lmng
    18         win32:LIBS += libmng.lib
    19 }
    20 !contains(QT_CONFIG, system-mng) {
    21         DEFINES += MNG_BUILD_SO
    22         DEFINES += MNG_NO_INCLUDE_JNG
    23         INCLUDEPATH += ../../../3rdparty/libmng
    24         SOURCES  += \
    25             ../../../3rdparty/libmng/libmng_callback_xs.c \
    26             ../../../3rdparty/libmng/libmng_chunk_io.c \
    27             ../../../3rdparty/libmng/libmng_chunk_descr.c \
    28             ../../../3rdparty/libmng/libmng_chunk_prc.c \
    29             ../../../3rdparty/libmng/libmng_chunk_xs.c \
    30             ../../../3rdparty/libmng/libmng_cms.c \
    31             ../../../3rdparty/libmng/libmng_display.c \
    32             ../../../3rdparty/libmng/libmng_dither.c \
    33             ../../../3rdparty/libmng/libmng_error.c \
    34             ../../../3rdparty/libmng/libmng_filter.c \
    35             ../../../3rdparty/libmng/libmng_hlapi.c \
    36             ../../../3rdparty/libmng/libmng_jpeg.c \
    37             ../../../3rdparty/libmng/libmng_object_prc.c \
    38             ../../../3rdparty/libmng/libmng_pixels.c \
    39             ../../../3rdparty/libmng/libmng_prop_xs.c \
    40             ../../../3rdparty/libmng/libmng_read.c \
    41             ../../../3rdparty/libmng/libmng_trace.c \
    42             ../../../3rdparty/libmng/libmng_write.c \
    43             ../../../3rdparty/libmng/libmng_zlib.c
    44 }
    45 
    46 contains(QT_CONFIG, system-zlib) {
    47         LIBS += -lz
    48 }
    49 !contains(QT_CONFIG, system-zlib) {
    50         INCLUDEPATH +=  ../../../3rdparty/zlib
    51 }
     12include(../../../gui/image/qmnghandler.pri)
     13SOURCES += main.cpp
    5214
    5315QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
    5416target.path += $$[QT_INSTALL_PLUGINS]/imageformats
    5517INSTALLS += target
    56 
  • trunk/src/plugins/imageformats/svg/main.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)
     
    6363QStringList QSvgPlugin::keys() const
    6464{
    65     return QStringList() << QLatin1String("svg");
     65    return QStringList() << QLatin1String("svg") << QLatin1String("svgz");
    6666}
    6767
    6868QImageIOPlugin::Capabilities QSvgPlugin::capabilities(QIODevice *device, const QByteArray &format) const
    6969{
    70     //### canRead disabled for now because it's hard to detect
    71     //    whether the file is actually svg without parsing it
    72     //if (device->isReadable() && QSvgIOHandler::canRead(device))
    73 
    74     if (format == "svg")
     70    if (format == "svg" || format == "svgz")
    7571        return Capabilities(CanRead);
    76     else
    77         return 0;
    78 
    79 
    80     if (!device->isOpen())
     72    if (!format.isEmpty())
    8173        return 0;
    8274
    8375    Capabilities cap;
    84     if (device->isReadable())
     76    if (device->isReadable() && QSvgIOHandler::canRead(device))
    8577        cap |= CanRead;
    8678    return cap;
  • trunk/src/plugins/imageformats/svg/qsvgiohandler.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)
     
    4949#include "qpainter.h"
    5050#include "qvariant.h"
     51#include "qbuffer.h"
    5152#include "qdebug.h"
    5253
     
    5657{
    5758public:
    58     QSvgIOHandlerPrivate()
    59         : r(new QSvgRenderer()), loaded(false)
     59    QSvgIOHandlerPrivate(QSvgIOHandler *qq)
     60        : q(qq), loaded(false), readDone(false), backColor(Qt::transparent)
    6061    {}
    61     ~QSvgIOHandlerPrivate()
    62     {
    63         delete r;
    64     }
    6562
    6663    bool load(QIODevice *device);
    67     static bool findSvgTag(QIODevice *device);
    68 
    69     QSvgRenderer *r;
    70     QSize         defaultSize;
    71     QSize         currentSize;
    72     bool          loaded;
     64
     65    QSvgIOHandler   *q;
     66    QSvgRenderer     r;
     67    QXmlStreamReader xmlReader;
     68    QSize            defaultSize;
     69    QRect            clipRect;
     70    QSize            scaledSize;
     71    QRect            scaledClipRect;
     72    bool             loaded;
     73    bool             readDone;
     74    QColor           backColor;
    7375};
    7476
     77
    7578bool QSvgIOHandlerPrivate::load(QIODevice *device)
    7679{
    7780    if (loaded)
    7881        return true;
    79 
    80     if (r->load(device->readAll())) {
    81         defaultSize = QSize(r->viewBox().width(), r->viewBox().height());
    82         if (currentSize.isEmpty())
    83             currentSize = defaultSize;
    84     }
    85     loaded = r->isValid();
     82    if (q->format().isEmpty())
     83        q->canRead();
     84
     85    // # The SVG renderer doesn't handle trailing, unrelated data, so we must
     86    // assume that all available data in the device is to be read.
     87    bool res = false;
     88    QBuffer *buf = qobject_cast<QBuffer *>(device);
     89    if (buf) {
     90        const QByteArray &ba = buf->data();
     91        res = r.load(QByteArray::fromRawData(ba.constData() + buf->pos(), ba.size() - buf->pos()));
     92        buf->seek(ba.size());
     93    } else if (q->format() == "svgz") {
     94        res = r.load(device->readAll());
     95    } else {
     96        xmlReader.setDevice(device);
     97        res = r.load(&xmlReader);
     98    }
     99
     100    if (res) {
     101        defaultSize = QSize(r.viewBox().width(), r.viewBox().height());
     102        loaded = true;
     103    }
    86104
    87105    return loaded;
    88106}
    89107
    90 bool QSvgIOHandlerPrivate::findSvgTag(QIODevice *device)
    91 {
    92     qint64 pos = device->pos();
    93     device->seek(0);
    94     char buffer[256];
    95     const char svg_tag[] = "<svg";
    96 
    97     while (1) {
    98         int size = device->read(buffer, 256);
    99         for (int i=0; i<size - 5; ++i) {
    100             if (!memcmp(buffer + i, svg_tag, 4)) {
    101                 if (buffer[i+4] == ' ' || buffer[i+4] == '\t'
    102                     || buffer[i+4] == '\n' || buffer[i+4] == '\r')
    103                 {
    104                     device->seek(pos);
    105                     return true;
    106                 }
     108
     109QSvgIOHandler::QSvgIOHandler()
     110    : d(new QSvgIOHandlerPrivate(this))
     111{
     112
     113}
     114
     115
     116QSvgIOHandler::~QSvgIOHandler()
     117{
     118    delete d;
     119}
     120
     121
     122bool QSvgIOHandler::canRead() const
     123{
     124    if (!device())
     125        return false;
     126    if (d->loaded && !d->readDone)
     127        return true;        // Will happen if we have been asked for the size
     128
     129    QByteArray buf = device()->peek(8);
     130    if (buf.startsWith("\x1f\x8b")) {
     131        setFormat("svgz");
     132        return true;
     133    } else if (buf.contains("<?xml") || buf.contains("<svg")) {
     134        setFormat("svg");
     135        return true;
     136    }
     137    return false;
     138}
     139
     140
     141QByteArray QSvgIOHandler::name() const
     142{
     143    return "svg";
     144}
     145
     146
     147bool QSvgIOHandler::read(QImage *image)
     148{
     149    if (!d->readDone && d->load(device())) {
     150        bool xform = (d->clipRect.isValid() || d->scaledSize.isValid() || d->scaledClipRect.isValid());
     151        QSize finalSize = d->defaultSize;
     152        QRectF bounds;
     153        if (xform && !d->defaultSize.isEmpty()) {
     154            bounds = QRectF(QPointF(0,0), QSizeF(d->defaultSize));
     155            QPoint tr1, tr2;
     156            QSizeF sc(1, 1);
     157            if (d->clipRect.isValid()) {
     158                tr1 = -d->clipRect.topLeft();
     159                finalSize = d->clipRect.size();
    107160            }
     161            if (d->scaledSize.isValid()) {
     162                sc = QSizeF(qreal(d->scaledSize.width()) / finalSize.width(),
     163                            qreal(d->scaledSize.height()) / finalSize.height());
     164                finalSize = d->scaledSize;
     165            }
     166            if (d->scaledClipRect.isValid()) {
     167                tr2 = -d->scaledClipRect.topLeft();
     168                finalSize = d->scaledClipRect.size();
     169            }
     170            QTransform t;
     171            t.translate(tr2.x(), tr2.y());
     172            t.scale(sc.width(), sc.height());
     173            t.translate(tr1.x(), tr1.y());
     174            bounds = t.mapRect(bounds);
    108175        }
    109         if (device->atEnd())
    110             break;
    111         device->seek(device->pos()-4);
    112     }
    113     device->seek(pos);
    114     return false;
    115 }
    116 
    117 QSvgIOHandler::QSvgIOHandler()
    118     : d(new QSvgIOHandlerPrivate())
    119 {
    120 
    121 }
    122 
    123 
    124 QSvgIOHandler::~QSvgIOHandler()
    125 {
    126     delete d;
    127 }
    128 
    129 
    130 bool QSvgIOHandler::canRead() const
    131 {
    132     return QSvgIOHandlerPrivate::findSvgTag(device());
    133 }
    134 
    135 
    136 QByteArray QSvgIOHandler::name() const
    137 {
    138     return "svg";
    139 }
    140 
    141 
    142 bool QSvgIOHandler::read(QImage *image)
    143 {
    144     if (d->load(device())) {
    145         *image = QImage(d->currentSize, QImage::Format_ARGB32_Premultiplied);
    146         if (!d->currentSize.isEmpty()) {
    147             image->fill(0x00000000);
     176        *image = QImage(finalSize, QImage::Format_ARGB32_Premultiplied);
     177        if (!finalSize.isEmpty()) {
     178            image->fill(d->backColor.rgba());
    148179            QPainter p(image);
    149             d->r->render(&p);
     180            d->r.render(&p, bounds);
    150181            p.end();
    151182        }
     183        d->readDone = true;
    152184        return true;
    153185    }
     
    167199        return d->defaultSize;
    168200        break;
     201    case ClipRect:
     202        return d->clipRect;
     203        break;
    169204    case ScaledSize:
    170         return d->currentSize;
     205        return d->scaledSize;
     206        break;
     207    case ScaledClipRect:
     208        return d->scaledClipRect;
     209        break;
     210    case BackgroundColor:
     211        return d->backColor;
    171212        break;
    172213    default:
     
    180221{
    181222    switch(option) {
    182     case Size:
    183         d->defaultSize = value.toSize();
    184         d->currentSize = value.toSize();
     223    case ClipRect:
     224        d->clipRect = value.toRect();
    185225        break;
    186226    case ScaledSize:
    187         d->currentSize = value.toSize();
     227        d->scaledSize = value.toSize();
     228        break;
     229    case ScaledClipRect:
     230        d->scaledClipRect = value.toRect();
     231        break;
     232    case BackgroundColor:
     233        d->backColor = value.value<QColor>();
    188234        break;
    189235    default:
     
    199245    case ImageFormat:
    200246    case Size:
     247    case ClipRect:
    201248    case ScaledSize:
     249    case ScaledClipRect:
     250    case BackgroundColor:
    202251        return true;
    203252    default:
     
    207256}
    208257
     258
    209259bool QSvgIOHandler::canRead(QIODevice *device)
    210260{
    211     return QSvgIOHandlerPrivate::findSvgTag(device);
     261    QByteArray buf = device->peek(8);
     262    return buf.startsWith("\x1f\x8b") || buf.contains("<?xml") || buf.contains("<svg");
    212263}
    213264
  • trunk/src/plugins/imageformats/svg/qsvgiohandler.h

    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)
  • trunk/src/plugins/imageformats/tiff/main.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)
     
    4848#undef QT_NO_IMAGEFORMAT_TIFF
    4949#endif
    50 #include "qtiffhandler.h"
     50#include <qtiffhandler_p.h>
    5151
    5252QT_BEGIN_NAMESPACE
  • trunk/src/plugins/imageformats/tiff/tiff.pro

    r561 r846  
    44QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-tiff)"
    55
    6 HEADERS += qtiffhandler.h
    7 SOURCES += main.cpp \
    8            qtiffhandler.cpp
    9 
    10 contains(QT_CONFIG, system-tiff) {
    11         unix:LIBS += -ltiff
    12         win32:LIBS += libtiff.lib
    13 }
    14 !contains(QT_CONFIG, system-tiff) {
    15         INCLUDEPATH += ../../../3rdparty/libtiff/libtiff
    16         SOURCES  += \
    17             ../../../3rdparty/libtiff/libtiff/tif_aux.c \
    18             ../../../3rdparty/libtiff/libtiff/tif_close.c \
    19             ../../../3rdparty/libtiff/libtiff/tif_codec.c \
    20             ../../../3rdparty/libtiff/libtiff/tif_color.c \
    21             ../../../3rdparty/libtiff/libtiff/tif_compress.c \
    22             ../../../3rdparty/libtiff/libtiff/tif_dir.c \
    23             ../../../3rdparty/libtiff/libtiff/tif_dirinfo.c \
    24             ../../../3rdparty/libtiff/libtiff/tif_dirread.c \
    25             ../../../3rdparty/libtiff/libtiff/tif_dirwrite.c \
    26             ../../../3rdparty/libtiff/libtiff/tif_dumpmode.c \
    27             ../../../3rdparty/libtiff/libtiff/tif_error.c \
    28             ../../../3rdparty/libtiff/libtiff/tif_extension.c \
    29             ../../../3rdparty/libtiff/libtiff/tif_fax3.c \
    30             ../../../3rdparty/libtiff/libtiff/tif_fax3sm.c \
    31             ../../../3rdparty/libtiff/libtiff/tif_flush.c \
    32             ../../../3rdparty/libtiff/libtiff/tif_getimage.c \
    33             ../../../3rdparty/libtiff/libtiff/tif_luv.c \
    34             ../../../3rdparty/libtiff/libtiff/tif_lzw.c \
    35             ../../../3rdparty/libtiff/libtiff/tif_next.c \
    36             ../../../3rdparty/libtiff/libtiff/tif_open.c \
    37             ../../../3rdparty/libtiff/libtiff/tif_packbits.c \
    38             ../../../3rdparty/libtiff/libtiff/tif_pixarlog.c \
    39             ../../../3rdparty/libtiff/libtiff/tif_predict.c \
    40             ../../../3rdparty/libtiff/libtiff/tif_print.c \
    41             ../../../3rdparty/libtiff/libtiff/tif_read.c \
    42             ../../../3rdparty/libtiff/libtiff/tif_strip.c \
    43             ../../../3rdparty/libtiff/libtiff/tif_swab.c \
    44             ../../../3rdparty/libtiff/libtiff/tif_thunder.c \
    45             ../../../3rdparty/libtiff/libtiff/tif_tile.c \
    46             ../../../3rdparty/libtiff/libtiff/tif_version.c \
    47             ../../../3rdparty/libtiff/libtiff/tif_warning.c \
    48             ../../../3rdparty/libtiff/libtiff/tif_write.c \
    49             ../../../3rdparty/libtiff/libtiff/tif_zip.c
    50             win32 {
    51                SOURCES += ../../../3rdparty/libtiff/libtiff/tif_win32.c
    52             }
    53             os2 {
    54                SOURCES += ../../../3rdparty/libtiff/libtiff/tif_unix.c
    55             }
    56             unix: {
    57                SOURCES += ../../../3rdparty/libtiff/libtiff/tif_unix.c
    58             }
    59             wince*: {
    60                SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp
    61             }
    62             symbian*: {
    63                SOURCES += ../../../3rdparty/libtiff/port/lfind.c
    64             }
    65 }
    66 
    67 contains(QT_CONFIG, system-zlib) {
    68         LIBS += -lz
    69 }
    70 !contains(QT_CONFIG, system-zlib) {
    71         INCLUDEPATH +=  ../../../3rdparty/zlib
    72 }
     6include(../../../gui/image/qtiffhandler.pri)
     7SOURCES += main.cpp
    738
    749QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats
  • trunk/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.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)
  • trunk/src/plugins/inputmethods/imsw-multi/qmultiinputcontext.h

    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)
  • trunk/src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.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)
  • trunk/src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.h

    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)
  • trunk/src/plugins/kbddrivers/linuxinput/main.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)
  • trunk/src/plugins/mousedrivers/linuxtp/main.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)
  • trunk/src/plugins/mousedrivers/pc/main.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)
  • trunk/src/plugins/mousedrivers/tslib/main.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)
  • trunk/src/plugins/phonon/ds9/ds9.pro

    r2 r846  
    2323           $$PHONON_DS9_DIR/videowidget.h \
    2424           $$PHONON_DS9_DIR/videorenderer_soft.h \
    25            $$PHONON_DS9_DIR/videorenderer_vmr9.h \
    2625           $$PHONON_DS9_DIR/volumeeffect.h \
    2726           $$PHONON_DS9_DIR/qbasefilter.h \
     
    4645           $$PHONON_DS9_DIR/videowidget.cpp \
    4746           $$PHONON_DS9_DIR/videorenderer_soft.cpp \
    48            $$PHONON_DS9_DIR/videorenderer_vmr9.cpp \
    4947           $$PHONON_DS9_DIR/volumeeffect.cpp \
    5048           $$PHONON_DS9_DIR/qbasefilter.cpp \
     
    5452           $$PHONON_DS9_DIR/qmeminputpin.cpp
    5553
     54#the EVR renderer (only available on desktop)
     55!wince*:SOURCES += $$PHONON_DS9_DIR/videorenderer_evr.cpp \
     56                   $$PHONON_DS9_DIR/videorenderer_vmr9.cpp
     57!wince*:HEADERS += $$PHONON_DS9_DIR/qevr9.h \
     58                   $$PHONON_DS9_DIR/videorenderer_evr.h \
     59                   $$PHONON_DS9_DIR/videorenderer_vmr9.h
     60wince*:SOURCES  += $$PHONON_DS9_DIR/videorenderer_default.cpp
     61wince*:HEADERS  += $$PHONON_DS9_DIR/videorenderer_default.h
    5662
    5763target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
  • trunk/src/plugins/phonon/gstreamer/gstreamer.pro

    r2 r846  
    1616HEADERS += $$PHONON_GSTREAMER_DIR/common.h \
    1717 $$PHONON_GSTREAMER_DIR/audiooutput.h \
     18 $$PHONON_GSTREAMER_DIR/audiodataoutput.h \
    1819 $$PHONON_GSTREAMER_DIR/artssink.h \
    1920 $$PHONON_GSTREAMER_DIR/abstractrenderer.h \
     
    3637 $$PHONON_GSTREAMER_DIR/volumefadereffect.h
    3738
    38 SOURCES += $$PHONON_GSTREAMER_DIR/audiooutput.cpp \
    39  $$PHONON_GSTREAMER_DIR/abstractrenderer.cpp \
     39SOURCES += $$PHONON_GSTREAMER_DIR/abstractrenderer.cpp \
    4040 $$PHONON_GSTREAMER_DIR/artssink.cpp \
     41 $$PHONON_GSTREAMER_DIR/audioeffect.cpp \
     42 $$PHONON_GSTREAMER_DIR/audiooutput.cpp \
     43 $$PHONON_GSTREAMER_DIR/audiodataoutput.cpp \
    4144 $$PHONON_GSTREAMER_DIR/backend.cpp \
    4245 $$PHONON_GSTREAMER_DIR/devicemanager.cpp \
    4346 $$PHONON_GSTREAMER_DIR/effect.cpp \
    4447 $$PHONON_GSTREAMER_DIR/effectmanager.cpp \
     48 $$PHONON_GSTREAMER_DIR/glrenderer.cpp \
    4549 $$PHONON_GSTREAMER_DIR/gsthelper.cpp \
    46  $$PHONON_GSTREAMER_DIR/mediaobject.cpp \
    4750 $$PHONON_GSTREAMER_DIR/medianode.cpp \
    4851 $$PHONON_GSTREAMER_DIR/medianodeevent.cpp \
    49  $$PHONON_GSTREAMER_DIR/widgetrenderer.cpp \
     52 $$PHONON_GSTREAMER_DIR/mediaobject.cpp \
     53 $$PHONON_GSTREAMER_DIR/message.cpp \
     54 $$PHONON_GSTREAMER_DIR/phononsrc.cpp \
     55 $$PHONON_GSTREAMER_DIR/qwidgetvideosink.cpp \
     56 $$PHONON_GSTREAMER_DIR/streamreader.cpp \
    5057 $$PHONON_GSTREAMER_DIR/videowidget.cpp \
    51  $$PHONON_GSTREAMER_DIR/glrenderer.cpp \
    52  $$PHONON_GSTREAMER_DIR/qwidgetvideosink.cpp \
    53  $$PHONON_GSTREAMER_DIR/phononsrc.cpp \
    54  $$PHONON_GSTREAMER_DIR/streamreader.cpp \
    55  $$PHONON_GSTREAMER_DIR/message.cpp \
    56  $$PHONON_GSTREAMER_DIR/audioeffect.cpp \
    57  $$PHONON_GSTREAMER_DIR/volumefadereffect.cpp
     58 $$PHONON_GSTREAMER_DIR/volumefadereffect.cpp \
     59 $$PHONON_GSTREAMER_DIR/widgetrenderer.cpp
    5860
    5961!embedded {
  • trunk/src/plugins/phonon/mmf/mmf.pro

    r769 r846  
    11# MMF Phonon backend
     2symbian {
     3        QT += phonon
     4        TARGET = phonon_mmf
     5        PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf
    26
    3 QT += phonon
    4 TARGET = phonon_mmf
    5 PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf
     7        # Uncomment the following line in order to use the CDrmPlayerUtility client
     8        # API for audio playback, rather than CMdaAudioPlayerUtility.
     9        #CONFIG += phonon_mmf_audio_drm
    610
    7 # Uncomment the following line in order to use the CDrmPlayerUtility client
    8 # API for audio playback, rather than CMdaAudioPlayerUtility.
    9 #CONFIG += phonon_mmf_audio_drm
     11        phonon_mmf_audio_drm {
     12                LIBS += -lDrmAudioPlayUtility
     13                DEFINES += QT_PHONON_MMF_AUDIO_DRM
     14        } else {
     15                LIBS += -lmediaclientaudio
     16        }
    1017
    11 phonon_mmf_audio_drm {
    12     LIBS += -lDrmAudioPlayUtility
    13     DEFINES += QT_PHONON_MMF_AUDIO_DRM
    14 } else {
    15     LIBS += -lmediaclientaudio
     18        # This is necessary because both epoc32/include and Phonon contain videoplayer.h.
     19        # By making /epoc32/include the first SYSTEMINCLUDE, we ensure that
     20        # '#include <videoplayer.h>' picks up the Symbian header, as intended.
     21        PREPEND_INCLUDEPATH = $${EPOCROOT}epoc32/include
     22
     23        PREPEND_INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty
     24
     25        INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
     26
     27        HEADERS +=                                           \
     28                           $$PHONON_MMF_DIR/abstractaudioeffect.h    \
     29                           $$PHONON_MMF_DIR/abstractmediaplayer.h    \
     30                           $$PHONON_MMF_DIR/abstractplayer.h         \
     31                           $$PHONON_MMF_DIR/abstractvideooutput.h    \
     32                           $$PHONON_MMF_DIR/abstractvideoplayer.h    \
     33                           $$PHONON_MMF_DIR/audioequalizer.h         \
     34                           $$PHONON_MMF_DIR/audiooutput.h            \
     35                           $$PHONON_MMF_DIR/audioplayer.h            \
     36                           $$PHONON_MMF_DIR/backend.h                \
     37                           $$PHONON_MMF_DIR/bassboost.h              \
     38                           $$PHONON_MMF_DIR/defs.h                   \
     39                           $$PHONON_MMF_DIR/dummyplayer.h            \
     40                           $$PHONON_MMF_DIR/effectfactory.h          \
     41                           $$PHONON_MMF_DIR/effectparameter.h        \
     42                           $$PHONON_MMF_DIR/environmentalreverb.h    \
     43                           $$PHONON_MMF_DIR/loudness.h               \
     44                           $$PHONON_MMF_DIR/mediaobject.h            \
     45                           $$PHONON_MMF_DIR/mmf_medianode.h          \
     46                           $$PHONON_MMF_DIR/stereowidening.h         \
     47                           $$PHONON_MMF_DIR/objectdump.h             \
     48                           $$PHONON_MMF_DIR/objectdump_symbian.h     \
     49                           $$PHONON_MMF_DIR/objecttree.h             \
     50                           $$PHONON_MMF_DIR/utils.h                  \
     51                           $$PHONON_MMF_DIR/videowidget.h
     52
     53        SOURCES +=                                           \
     54                           $$PHONON_MMF_DIR/abstractaudioeffect.cpp  \
     55                           $$PHONON_MMF_DIR/abstractmediaplayer.cpp  \
     56                           $$PHONON_MMF_DIR/abstractplayer.cpp       \
     57                           $$PHONON_MMF_DIR/audioequalizer.cpp       \
     58                           $$PHONON_MMF_DIR/audiooutput.cpp          \
     59                           $$PHONON_MMF_DIR/audioplayer.cpp          \
     60                           $$PHONON_MMF_DIR/abstractvideooutput.cpp  \
     61                           $$PHONON_MMF_DIR/abstractvideoplayer.cpp  \
     62                           $$PHONON_MMF_DIR/backend.cpp              \
     63                           $$PHONON_MMF_DIR/bassboost.cpp            \
     64                           $$PHONON_MMF_DIR/dummyplayer.cpp          \
     65                           $$PHONON_MMF_DIR/effectfactory.cpp        \
     66                           $$PHONON_MMF_DIR/effectparameter.cpp      \
     67                           $$PHONON_MMF_DIR/environmentalreverb.cpp  \
     68                           $$PHONON_MMF_DIR/loudness.cpp             \
     69                           $$PHONON_MMF_DIR/mediaobject.cpp          \
     70                           $$PHONON_MMF_DIR/mmf_medianode.cpp        \
     71                           $$PHONON_MMF_DIR/stereowidening.cpp       \
     72                           $$PHONON_MMF_DIR/objectdump.cpp           \
     73                           $$PHONON_MMF_DIR/objectdump_symbian.cpp   \
     74                           $$PHONON_MMF_DIR/objecttree.cpp           \
     75                           $$PHONON_MMF_DIR/utils.cpp                \
     76                           $$PHONON_MMF_DIR/videowidget.cpp
     77
     78        symbian {
     79                # Test for whether the build environment supports video rendering to graphics
     80                # surfaces.
     81                exists($${EPOCROOT}epoc32/include/platform/videoplayer2.h) {
     82                        HEADERS +=                                       \
     83                                   $$PHONON_MMF_DIR/videooutput_surface.h    \
     84                                   $$PHONON_MMF_DIR/videoplayer_surface.h
     85                        SOURCES +=                                       \
     86                                   $$PHONON_MMF_DIR/videooutput_surface.cpp  \
     87                                   $$PHONON_MMF_DIR/videoplayer_surface.cpp
     88                        DEFINES += PHONON_MMF_VIDEO_SURFACES
     89                } else {
     90                        HEADERS +=                                       \
     91                                   $$PHONON_MMF_DIR/ancestormovemonitor.h    \
     92                                   $$PHONON_MMF_DIR/videooutput_dsa.h        \
     93                                   $$PHONON_MMF_DIR/videoplayer_dsa.h
     94                        SOURCES +=                                       \
     95                                   $$PHONON_MMF_DIR/ancestormovemonitor.cpp  \
     96                                   $$PHONON_MMF_DIR/videooutput_dsa.cpp      \
     97                                   $$PHONON_MMF_DIR/videoplayer_dsa.cpp      \
     98                }
     99
     100                # Test whether the build environment includes support for the Download Manager
     101                # API, required for Progressive Download
     102                exists($${EPOCROOT}epoc32/include/downloadmgrclient.h) | \
     103                exists($${EPOCROOT}epoc32/include/mw/downloadmgrclient.h) {
     104                        HEADERS += $$PHONON_MMF_DIR/download.h
     105                        SOURCES += $$PHONON_MMF_DIR/download.cpp
     106                        LIBS += -lDownloadMgr
     107                        DEFINES += PHONON_MMF_PROGRESSIVE_DOWNLOAD
     108                }
     109        }
     110
     111        LIBS += -lcone
     112        LIBS += -lws32
     113
     114        # This is only needed for debug builds, but is always linked against.
     115        LIBS += -lhal
     116
     117        TARGET.CAPABILITY = all -tcb
     118
     119        LIBS += -lmediaclientvideo        # For CVideoPlayerUtility
     120        LIBS += -lcone                    # For CCoeEnv
     121        LIBS += -lws32                    # For RWindow
     122        LIBS += -lefsrv                   # For file server
     123        LIBS += -lapgrfx -lapmime         # For recognizer
     124        LIBS += -lmmfcontrollerframework  # For CMMFMetaDataEntry
     125        LIBS += -lmediaclientaudiostream  # For CMdaAudioOutputStream
     126
     127        # These are for effects.
     128        LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
     129
     130        # This is to allow IAP to be specified
     131        LIBS += -lCommDb
     132
     133        # This is needed for having the .qtplugin file properly created on Symbian.
     134        QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
     135
     136        target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
     137        INSTALLS += target
     138
     139        include(../../qpluginbase.pri)
     140
     141        TARGET.UID3=0x2001E629
    16142}
    17 
    18 # This is necessary because both epoc32/include and Phonon contain videoplayer.h.
    19 # By making /epoc32/include the first SYSTEMINCLUDE, we ensure that
    20 # '#include <videoplayer.h>' picks up the Symbian header, as intended.
    21 PREPEND_INCLUDEPATH = /epoc32/include
    22 
    23 PREPEND_INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty
    24 
    25 INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
    26 
    27 HEADERS +=                                           \
    28            $$PHONON_MMF_DIR/abstractaudioeffect.h    \
    29            $$PHONON_MMF_DIR/abstractmediaplayer.h    \
    30            $$PHONON_MMF_DIR/abstractplayer.h         \
    31            $$PHONON_MMF_DIR/abstractvideooutput.h    \
    32            $$PHONON_MMF_DIR/abstractvideoplayer.h    \
    33            $$PHONON_MMF_DIR/audioequalizer.h         \
    34            $$PHONON_MMF_DIR/audiooutput.h            \
    35            $$PHONON_MMF_DIR/audioplayer.h            \
    36            $$PHONON_MMF_DIR/backend.h                \
    37            $$PHONON_MMF_DIR/bassboost.h              \
    38            $$PHONON_MMF_DIR/defs.h                   \
    39            $$PHONON_MMF_DIR/dummyplayer.h            \
    40            $$PHONON_MMF_DIR/effectfactory.h          \
    41            $$PHONON_MMF_DIR/effectparameter.h        \
    42            $$PHONON_MMF_DIR/environmentalreverb.h    \
    43            $$PHONON_MMF_DIR/loudness.h               \
    44            $$PHONON_MMF_DIR/mediaobject.h            \
    45            $$PHONON_MMF_DIR/mmf_medianode.h          \
    46            $$PHONON_MMF_DIR/stereowidening.h         \
    47            $$PHONON_MMF_DIR/objectdump.h             \
    48            $$PHONON_MMF_DIR/objectdump_symbian.h     \
    49            $$PHONON_MMF_DIR/objecttree.h             \
    50            $$PHONON_MMF_DIR/utils.h                  \
    51            $$PHONON_MMF_DIR/videowidget.h
    52 
    53 SOURCES +=                                           \
    54            $$PHONON_MMF_DIR/abstractaudioeffect.cpp  \
    55            $$PHONON_MMF_DIR/abstractmediaplayer.cpp  \
    56            $$PHONON_MMF_DIR/abstractplayer.cpp       \
    57            $$PHONON_MMF_DIR/audioequalizer.cpp       \
    58            $$PHONON_MMF_DIR/audiooutput.cpp          \
    59            $$PHONON_MMF_DIR/audioplayer.cpp          \
    60            $$PHONON_MMF_DIR/abstractvideooutput.cpp  \
    61            $$PHONON_MMF_DIR/abstractvideoplayer.cpp  \
    62            $$PHONON_MMF_DIR/backend.cpp              \
    63            $$PHONON_MMF_DIR/bassboost.cpp            \
    64            $$PHONON_MMF_DIR/dummyplayer.cpp          \
    65            $$PHONON_MMF_DIR/effectfactory.cpp        \
    66            $$PHONON_MMF_DIR/effectparameter.cpp      \
    67            $$PHONON_MMF_DIR/environmentalreverb.cpp  \
    68            $$PHONON_MMF_DIR/loudness.cpp             \
    69            $$PHONON_MMF_DIR/mediaobject.cpp          \
    70            $$PHONON_MMF_DIR/mmf_medianode.cpp        \
    71            $$PHONON_MMF_DIR/stereowidening.cpp       \
    72            $$PHONON_MMF_DIR/objectdump.cpp           \
    73            $$PHONON_MMF_DIR/objectdump_symbian.cpp   \
    74            $$PHONON_MMF_DIR/objecttree.cpp           \
    75            $$PHONON_MMF_DIR/utils.cpp                \
    76            $$PHONON_MMF_DIR/videowidget.cpp
    77 
    78 # Test for whether the build environment supports video rendering to graphics
    79 # surfaces.
    80 exists($${EPOCROOT}epoc32/include/platform/videoplayer2.h) {
    81     HEADERS +=                                       \
    82            $$PHONON_MMF_DIR/videooutput_surface.h    \
    83            $$PHONON_MMF_DIR/videoplayer_surface.h
    84     SOURCES +=                                       \
    85            $$PHONON_MMF_DIR/videooutput_surface.cpp  \
    86            $$PHONON_MMF_DIR/videoplayer_surface.cpp
    87     DEFINES += PHONON_MMF_VIDEO_SURFACES
    88 } else {
    89     HEADERS +=                                       \
    90            $$PHONON_MMF_DIR/ancestormovemonitor.h    \
    91            $$PHONON_MMF_DIR/videooutput_dsa.h        \
    92            $$PHONON_MMF_DIR/videoplayer_dsa.h
    93     SOURCES +=                                       \
    94            $$PHONON_MMF_DIR/ancestormovemonitor.cpp  \
    95            $$PHONON_MMF_DIR/videooutput_dsa.cpp      \
    96            $$PHONON_MMF_DIR/videoplayer_dsa.cpp      \
    97 }
    98 
    99 LIBS += -lcone
    100 LIBS += -lws32
    101 
    102 # This is only needed for debug builds, but is always linked against.
    103 LIBS += -lhal
    104 
    105 TARGET.CAPABILITY = all -tcb
    106 
    107 LIBS += -lmediaclientvideo        # For CVideoPlayerUtility
    108 LIBS += -lcone                    # For CCoeEnv
    109 LIBS += -lws32                    # For RWindow
    110 LIBS += -lefsrv                   # For file server
    111 LIBS += -lapgrfx -lapmime         # For recognizer
    112 LIBS += -lmmfcontrollerframework  # For CMMFMetaDataEntry
    113 LIBS += -lmediaclientaudiostream  # For CMdaAudioOutputStream
    114 
    115 # These are for effects.
    116 LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect
    117 
    118 # This is needed for having the .qtplugin file properly created on Symbian.
    119 QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
    120 
    121 target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
    122 INSTALLS += target
    123 
    124 include(../../qpluginbase.pri)
    125 
    126 TARGET.UID3=0x2001E629
    127 
  • trunk/src/plugins/plugins.pro

    r561 r846  
    11TEMPLATE = subdirs
    22
    3 SUBDIRS *= accessible imageformats sqldrivers iconengines script
     3SUBDIRS *= sqldrivers script bearer
    44unix:!symbian {
    55        contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv):SUBDIRS *= codecs
     
    77        SUBDIRS *= codecs
    88}
     9!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats iconengines
    910!embedded:SUBDIRS *= graphicssystems
    1011embedded:SUBDIRS *=  gfxdrivers decorations mousedrivers kbddrivers
    1112!win32:!os2:!embedded:!mac:!symbian:SUBDIRS *= inputmethods
     13!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS += accessible
    1214symbian:SUBDIRS += s60
    1315contains(QT_CONFIG, phonon): SUBDIRS *= phonon
    1416contains(QT_CONFIG, multimedia): SUBDIRS *= audio
     17contains(QT_CONFIG, declarative): SUBDIRS *= qmltooling
  • trunk/src/plugins/s60/3_2/3_2.pro

    r769 r846  
    1111        ../src/qdesktopservices_3_2.cpp \
    1212        ../src/qcoreapplication_3_2.cpp
    13     LIBS += -lDirectoryLocalizer -lefsrv
     13    contains(CONFIG, is_using_gnupoc) {
     14        LIBS += -ldirectorylocalizer
     15    } else {
     16        LIBS += -lDirectoryLocalizer
     17    }
     18    LIBS += -lefsrv
    1419    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
    1520}
  • trunk/src/plugins/s60/5_0/5_0.pro

    r769 r846  
    1111        ../src/qdesktopservices_3_2.cpp \
    1212        ../src/qcoreapplication_3_2.cpp
    13     LIBS += -lDirectoryLocalizer -lefsrv
     13    contains(CONFIG, is_using_gnupoc) {
     14        LIBS += -ldirectorylocalizer
     15    } else {
     16        LIBS += -lDirectoryLocalizer
     17    }
     18    LIBS += -lefsrv
    1419    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
    1520}
  • trunk/src/plugins/s60/s60.pro

    r561 r846  
    11TEMPLATE = subdirs
    22
    3 symbian:SUBDIRS = 3_1 3_2 5_0
     3
     4symbian {
     5    contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
     6        SUBDIRS += 3_1 3_2
     7    }
     8
     9    # 5.0 is used also for Symbian3 and later
     10    SUBDIRS += 5_0
     11}
  • trunk/src/plugins/s60/s60pluginbase.pri

    r561 r846  
    55CONFIG  -= plugin
    66
     7QTDIR_build:DESTDIR      = $$QT_BUILD_TREE/plugins/s60
     8
    79MMP_RULES += NOEXPORTLIBRARY
    810
    9 defBlock = \
    10     "$${LITERAL_HASH}ifdef WINSCW" \
    11     "DEFFILE ../bwins/qts60plugin.def" \
    12     "$${LITERAL_HASH}else" \
    13     "DEFFILE ../eabi/qts60plugin.def" \
    14     "$${LITERAL_HASH}endif"
     11symbian-abld|symbian-sbsv2 {
     12    defBlock = \
     13        "$${LITERAL_HASH}ifdef WINSCW" \
     14        "DEFFILE ../bwins/qts60plugin.def" \
     15        "$${LITERAL_HASH}else" \
     16        "DEFFILE ../eabi/qts60plugin.def" \
     17        "$${LITERAL_HASH}endif"
     18} else {
     19    CONFIG *= def_files
     20    DEF_FILE = ../eabi/qts60pluginu.def
     21}
    1522
    1623MMP_RULES += defBlock
  • trunk/src/plugins/s60/src/qcoreapplication_3_1.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)
  • trunk/src/plugins/s60/src/qcoreapplication_3_2.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)
  • trunk/src/plugins/s60/src/qdesktopservices_3_1.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)
  • trunk/src/plugins/s60/src/qdesktopservices_3_2.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)
  • trunk/src/plugins/s60/src/qlocale_3_1.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)
  • trunk/src/plugins/s60/src/qlocale_3_2.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)
  • trunk/src/plugins/script/qtdbus/main.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)
     
    4444#include <QMetaMethod>
    4545#include <QScriptExtensionPlugin>
     46
     47#ifndef QT_NO_DBUS
    4648
    4749QT_USE_NAMESPACE
     
    395397Q_EXPORT_STATIC_PLUGIN(QtDBusScriptPlugin)
    396398Q_EXPORT_PLUGIN2(qtscriptdbus, QtDBusScriptPlugin)
     399
     400#endif // QT_NO_DBUS
  • trunk/src/plugins/script/qtdbus/main.h

    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)
     
    4646#include <QtScript/qscriptable.h>
    4747#include <QtScript/qscriptengine.h>
     48
     49#ifndef QT_NO_DBUS
    4850
    4951class QDBusConnectionConstructor : public QObject,
     
    174176};
    175177
     178#endif // QT_NO_DBUS
    176179#endif // QDBUSBINDING_H
  • trunk/src/plugins/sqldrivers/db2/db2.pro

    r2 r846  
    1 TARGET  = qsqldb2
     1TARGET = qsqldb2
    22
    3 HEADERS         = ../../../sql/drivers/db2/qsql_db2.h
    4 SOURCES         = main.cpp \
    5                   ../../../sql/drivers/db2/qsql_db2.cpp
    6 
    7 unix:!contains( LIBS, .*db2.* ):LIBS    *= -ldb2
    8 win32:!contains( LIBS, .*db2.* ):LIBS   *= -ldb2cli
     3SOURCES = main.cpp
     4include(../../../sql/drivers/db2/qsql_db2.pri)
    95
    106include(../qsqldriverbase.pri)
  • trunk/src/plugins/sqldrivers/db2/main.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)
  • trunk/src/plugins/sqldrivers/ibase/ibase.pro

    r2 r846  
    1 TARGET  = qsqlibase
     1TARGET = qsqlibase
    22
    3 HEADERS         = ../../../sql/drivers/ibase/qsql_ibase.h
    4 SOURCES         = main.cpp \
    5                   ../../../sql/drivers/ibase/qsql_ibase.cpp
    6 
    7 unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS    *= -lgds
    8 
    9 win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
    10         !win32-borland:LIBS *= -lgds32_ms
    11         win32-borland:LIBS  += gds32.lib
    12 }
     3SOURCES = main.cpp
     4include(../../../sql/drivers/ibase/qsql_ibase.pri)
    135
    146include(../qsqldriverbase.pri)
  • trunk/src/plugins/sqldrivers/ibase/main.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)
  • trunk/src/plugins/sqldrivers/mysql/main.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)
  • trunk/src/plugins/sqldrivers/mysql/mysql.pro

    r792 r846  
    1 TARGET  = qsqlmysql
     1TARGET = qsqlmysql
    22os2:TARGET_SHORT = qmysql
    33
    4 HEADERS         = ../../../sql/drivers/mysql/qsql_mysql.h
    5 SOURCES         = main.cpp \
    6                   ../../../sql/drivers/mysql/qsql_mysql.cpp
    7 
    8 unix: {
    9     isEmpty(QT_LFLAGS_MYSQL) {
    10         !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
    11             use_libmysqlclient_r:LIBS *= -lmysqlclient_r
    12             else:LIBS *= -lmysqlclient
    13         }
    14     } else {
    15         LIBS *= $$QT_LFLAGS_MYSQL
    16         QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
    17     }
    18 }
    19 
    20 win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
    21     LIBS     *= -llibmysql   
    22 }
     4SOURCES = main.cpp
     5include(../../../sql/drivers/mysql/qsql_mysql.pri)
    236
    247os2 {
  • trunk/src/plugins/sqldrivers/oci/main.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)
  • trunk/src/plugins/sqldrivers/oci/oci.pro

    r2 r846  
    1 TARGET  = qsqloci
     1TARGET = qsqloci
    22
    3 HEADERS         = ../../../sql/drivers/oci/qsql_oci.h
    4 SOURCES         = main.cpp \
    5                   ../../../sql/drivers/oci/qsql_oci.cpp
    6 
    7 win32:LIBS      *= -loci
    8 
    9 unix:!contains( LIBS, .*clnts.* ):LIBS  *= -lclntsh
    10 
    11 macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
     3SOURCES = main.cpp
     4include(../../../sql/drivers/oci/qsql_oci.pri)
    125
    136include(../qsqldriverbase.pri)
  • trunk/src/plugins/sqldrivers/odbc/main.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)
  • trunk/src/plugins/sqldrivers/odbc/odbc.pro

    r769 r846  
    1 TARGET  = qsqlodbc
     1TARGET = qsqlodbc
    22
    3 HEADERS         = ../../../sql/drivers/odbc/qsql_odbc.h
    4 SOURCES         = main.cpp \
    5                   ../../../sql/drivers/odbc/qsql_odbc.cpp
    6 
    7 unix {
    8         !contains( LIBS, .*odbc.* ) {
    9             LIBS        *= $$QT_LFLAGS_ODBC
    10         }
    11         DEFINES += UNICODE
    12 }
    13 
    14 win32 {
    15         !win32-borland:LIBS     *= -lodbc32
    16         win32-borland:LIBS      *= $(BCB)/lib/PSDK/odbc32.lib
    17 }
     3SOURCES = main.cpp
     4include(../../../sql/drivers/odbc/qsql_odbc.pri)
    185
    196include(../qsqldriverbase.pri)
  • trunk/src/plugins/sqldrivers/psql/main.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)
  • trunk/src/plugins/sqldrivers/psql/psql.pro

    r803 r846  
    1 TARGET  = qsqlpsql
     1TARGET = qsqlpsql
    22os2:TARGET_SHORT = qpsql
    33
    4 HEADERS         = ../../../sql/drivers/psql/qsql_psql.h
    5 SOURCES         = main.cpp \
    6                   ../../../sql/drivers/psql/qsql_psql.cpp
    7 
    8 unix: {
    9     !isEmpty(QT_LFLAGS_PSQL) {
    10         LIBS *= $$QT_LFLAGS_PSQL
    11         QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
    12     }
    13     !contains(LIBS, .*pq.*):LIBS *= -lpq
    14 }
    15 
    16 win32:!contains(LIBS, .*pq.* ) {
    17     !win32-g++:LIBS    *= -llibpq       
    18     win32-g++:LIBS *= -lpq     
    19     LIBS    *= -lws2_32 -ladvapi32
    20 }
     4SOURCES = main.cpp
     5include(../../../sql/drivers/psql/qsql_psql.pri)
    216
    227os2 {
  • trunk/src/plugins/sqldrivers/sqlite/smain.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)
  • trunk/src/plugins/sqldrivers/sqlite/sqlite.pro

    r769 r846  
    1 TARGET  = qsqlite
     1TARGET = qsqlite
    22os2:TARGET_SHORT = qsqlit
    33
    4 HEADERS         = ../../../sql/drivers/sqlite/qsql_sqlite.h
    5 SOURCES         = smain.cpp \
    6                   ../../../sql/drivers/sqlite/qsql_sqlite.cpp
    7 
    8 !system-sqlite:!contains( LIBS, .*sqlite.* ) {
    9     CONFIG(release, debug|release):DEFINES *= NDEBUG
    10     DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
    11     INCLUDEPATH += ../../../3rdparty/sqlite
    12     SOURCES += ../../../3rdparty/sqlite/sqlite3.c
    13 } else {
    14     LIBS *= $$QT_LFLAGS_SQLITE
    15     QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
    16 }
     4SOURCES = smain.cpp
     5include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
    176
    187wince*: DEFINES += HAVE_LOCALTIME_S=0
  • trunk/src/plugins/sqldrivers/sqlite2/smain.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)
  • trunk/src/plugins/sqldrivers/sqlite2/sqlite2.pro

    r2 r846  
    1 TARGET  = qsqlite2
     1TARGET = qsqlite2
    22
    3 HEADERS         = ../../../sql/drivers/sqlite2/qsql_sqlite2.h
    4 SOURCES         = smain.cpp \
    5                   ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp
    6 
    7 !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
     3SOURCES = smain.cpp
     4include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
    85
    96include(../qsqldriverbase.pri)
  • trunk/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro

    r561 r846  
    33
    44# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
    5 symbian {
     5symbian-abld|symbian-sbsv2 {
    66    !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
    77        BLD_INF_RULES.prj_exports +=  ":zip SQLite3_v9.2.zip"
  • trunk/src/plugins/sqldrivers/tds/main.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)
  • trunk/src/plugins/sqldrivers/tds/tds.pro

    r2 r846  
    1 TARGET  = qsqltds
     1TARGET = qsqltds
    22
    3 HEADERS         = ../../../sql/drivers/tds/qsql_tds.h
    4 
    5 SOURCES         = main.cpp \
    6                   ../../../sql/drivers/tds/qsql_tds.cpp
    7 
    8 unix:!contains( LIBS, .*sybdb.* ):LIBS  *= -lsybdb
    9 
    10 win32 {
    11     !win32-borland:LIBS *= -lNTWDBLIB
    12     win32-borland:LIBS  *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
    13 }
     3SOURCES = main.cpp
     4include(../../../sql/drivers/tds/qsql_tds.pri)
    145
    156include(../qsqldriverbase.pri)
Note: See TracChangeset for help on using the changeset viewer.