Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qguivariant.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6161#include "qsizepolicy.h"
    6262#include "qtextformat.h"
     63#include "qmatrix4x4.h"
     64#include "qvector2d.h"
     65#include "qvector3d.h"
     66#include "qvector4d.h"
     67#include "qquaternion.h"
    6368
    6469#include "private/qvariant_p.h"
     
    149154        break;
    150155    }
     156#ifndef QT_NO_MATRIX4X4
     157    case QVariant::Matrix4x4:
     158        v_construct<QMatrix4x4>(x, copy);
     159        break;
     160#endif
     161#ifndef QT_NO_VECTOR2D
     162    case QVariant::Vector2D:
     163        v_construct<QVector2D>(x, copy);
     164        break;
     165#endif
     166#ifndef QT_NO_VECTOR3D
     167    case QVariant::Vector3D:
     168        v_construct<QVector3D>(x, copy);
     169        break;
     170#endif
     171#ifndef QT_NO_VECTOR4D
     172    case QVariant::Vector4D:
     173        v_construct<QVector4D>(x, copy);
     174        break;
     175#endif
     176#ifndef QT_NO_QUATERNION
     177    case QVariant::Quaternion:
     178        v_construct<QQuaternion>(x, copy);
     179        break;
     180#endif
    151181    default:
    152182        qcoreVariantHandler()->construct(x, copy);
     
    222252        v_clear<QPen>(d);
    223253        break;
     254#ifndef QT_NO_MATRIX4X4
     255    case QVariant::Matrix4x4:
     256        v_clear<QMatrix4x4>(d);
     257        break;
     258#endif
     259#ifndef QT_NO_VECTOR2D
     260    case QVariant::Vector2D:
     261        v_clear<QVector2D>(d);
     262        break;
     263#endif
     264#ifndef QT_NO_VECTOR3D
     265    case QVariant::Vector3D:
     266        v_clear<QVector3D>(d);
     267        break;
     268#endif
     269#ifndef QT_NO_VECTOR4D
     270    case QVariant::Vector4D:
     271        v_clear<QVector4D>(d);
     272        break;
     273#endif
     274#ifndef QT_NO_QUATERNION
     275    case QVariant::Quaternion:
     276        v_clear<QVector4D>(d);
     277        break;
     278#endif
    224279    default:
    225280        qcoreVariantHandler()->clear(d);
     
    267322#endif
    268323    case QVariant::Pen:
    269         break;
     324#ifndef QT_NO_MATRIX4X4
     325    case QVariant::Matrix4x4:
     326#endif
     327        break;
     328#ifndef QT_NO_VECTOR2D
     329    case QVariant::Vector2D:
     330        return v_cast<QVector2D>(d)->isNull();
     331#endif
     332#ifndef QT_NO_VECTOR3D
     333    case QVariant::Vector3D:
     334        return v_cast<QVector3D>(d)->isNull();
     335#endif
     336#ifndef QT_NO_VECTOR4D
     337    case QVariant::Vector4D:
     338        return v_cast<QVector4D>(d)->isNull();
     339#endif
     340#ifndef QT_NO_QUATERNION
     341    case QVariant::Quaternion:
     342        return v_cast<QQuaternion>(d)->isNull();
     343#endif
    270344    default:
    271345        return qcoreVariantHandler()->isNull(d);
     
    327401    case QVariant::Pen:
    328402        return *v_cast<QPen>(a) == *v_cast<QPen>(b);
     403#ifndef QT_NO_MATRIX4X4
     404    case QVariant::Matrix4x4:
     405        return *v_cast<QMatrix4x4>(a) == *v_cast<QMatrix4x4>(b);
     406#endif
     407#ifndef QT_NO_VECTOR2D
     408    case QVariant::Vector2D:
     409        return *v_cast<QVector2D>(a) == *v_cast<QVector2D>(b);
     410#endif
     411#ifndef QT_NO_VECTOR3D
     412    case QVariant::Vector3D:
     413        return *v_cast<QVector3D>(a) == *v_cast<QVector3D>(b);
     414#endif
     415#ifndef QT_NO_VECTOR4D
     416    case QVariant::Vector4D:
     417        return *v_cast<QVector4D>(a) == *v_cast<QVector4D>(b);
     418#endif
     419#ifndef QT_NO_QUATERNION
     420    case QVariant::Quaternion:
     421        return *v_cast<QQuaternion>(a) == *v_cast<QQuaternion>(b);
     422#endif
    329423    default:
    330424        break;
     
    514608        dbg.nospace() << qvariant_cast<QPen>(v);
    515609        break;
     610#ifndef QT_NO_MATRIX4X4
     611    case QVariant::Matrix4x4:
     612        dbg.nospace() << qvariant_cast<QMatrix4x4>(v);
     613        break;
     614#endif
     615#ifndef QT_NO_VECTOR2D
     616    case QVariant::Vector2D:
     617        dbg.nospace() << qvariant_cast<QVector2D>(v);
     618        break;
     619#endif
     620#ifndef QT_NO_VECTOR3D
     621    case QVariant::Vector3D:
     622        dbg.nospace() << qvariant_cast<QVector3D>(v);
     623        break;
     624#endif
     625#ifndef QT_NO_VECTOR4D
     626    case QVariant::Vector4D:
     627        dbg.nospace() << qvariant_cast<QVector4D>(v);
     628        break;
     629#endif
     630#ifndef QT_NO_QUATERNION
     631    case QVariant::Quaternion:
     632        dbg.nospace() << qvariant_cast<QQuaternion>(v);
     633        break;
     634#endif
    516635    default:
    517636        qcoreVariantHandler()->debugStream(dbg, v);
     
    597716Q_DECL_METATYPE_HELPER(QMatrix)
    598717Q_DECL_METATYPE_HELPER(QTransform)
     718#ifndef QT_NO_MATRIX4X4
     719Q_DECL_METATYPE_HELPER(QMatrix4x4)
     720#endif
     721#ifndef QT_NO_VECTOR2D
     722Q_DECL_METATYPE_HELPER(QVector2D)
     723#endif
     724#ifndef QT_NO_VECTOR3D
     725Q_DECL_METATYPE_HELPER(QVector3D)
     726#endif
     727#ifndef QT_NO_VECTOR4D
     728Q_DECL_METATYPE_HELPER(QVector4D)
     729#endif
     730#ifndef QT_NO_QUATERNION
     731Q_DECL_METATYPE_HELPER(QQuaternion)
     732#endif
    599733
    600734#ifdef QT_NO_DATASTREAM
     
    646780    Q_IMPL_METATYPE_HELPER(QTextFormat),
    647781    Q_IMPL_METATYPE_HELPER(QMatrix),
    648     Q_IMPL_METATYPE_HELPER(QTransform)
     782    Q_IMPL_METATYPE_HELPER(QTransform),
     783#ifndef QT_NO_MATRIX4X4
     784    Q_IMPL_METATYPE_HELPER(QMatrix4x4),
     785#else
     786    {0, 0, 0, 0},
     787#endif
     788#ifndef QT_NO_VECTOR2D
     789    Q_IMPL_METATYPE_HELPER(QVector2D),
     790#else
     791    {0, 0, 0, 0},
     792#endif
     793#ifndef QT_NO_VECTOR3D
     794    Q_IMPL_METATYPE_HELPER(QVector3D),
     795#else
     796    {0, 0, 0, 0},
     797#endif
     798#ifndef QT_NO_VECTOR4D
     799    Q_IMPL_METATYPE_HELPER(QVector4D),
     800#else
     801    {0, 0, 0, 0},
     802#endif
     803#ifndef QT_NO_QUATERNION
     804    Q_IMPL_METATYPE_HELPER(QQuaternion)
     805#else
     806    {0, 0, 0, 0}
     807#endif
    649808};
    650809
Note: See TracChangeset for help on using the changeset viewer.