diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.h | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qobjectdefs.h | 2 |
5 files changed, 17 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3990c7d..a10b6d6 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1004,6 +1004,7 @@ typedef int QNoImplicitBoolCast; #define QT_NO_FPU #endif +// This logic must match the one in qmetatype.h #if defined(QT_COORD_TYPE) typedef QT_COORD_TYPE qreal; #elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index b65f956..6f3316c 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -2003,6 +2003,11 @@ QVariant::Type QMetaProperty::type() const if (enumMetaTypeId == 0) return QVariant::Int; } +#ifdef QT_COORD_TYPE + // qreal metatype must be resolved at runtime. + if (strcmp(typeName(), "qreal") == 0) + return QVariant::Type(qMetaTypeId<qreal>()); +#endif return QVariant::UserType; } diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index ce10bae..a0b954f 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -179,6 +179,7 @@ QT_BEGIN_NAMESPACE \omitvalue LastCoreExtType \omitvalue LastCoreType \omitvalue LastGuiType + \omitvalue QReal Additional types can be registered using Q_DECLARE_METATYPE(). diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 648f933..be8a667 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -86,6 +86,15 @@ public: UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137, LastCoreExtType = 137 /* QWidgetStar */, +// This logic must match the one in qglobal.h +#if defined(QT_COORD_TYPE) + QReal = 0, +#elif defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) + QReal = Float, +#else + QReal = Double, +#endif + User = 256 }; diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 3a22323..f5d08ce 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -55,7 +55,7 @@ class QByteArray; class QString; #ifndef Q_MOC_OUTPUT_REVISION -#define Q_MOC_OUTPUT_REVISION 61 +#define Q_MOC_OUTPUT_REVISION 62 #endif // The following macros are our "extensions" to C++ |