From e2f295e27c10a9f3633344427959219caf63753d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 27 Feb 2012 12:00:07 +0100 Subject: Detect QMetaType::QReal from the definition of qreal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of relying to complex preprocessor expression that need to be maintained to be kept the same as in qglobal.h This aslo fix the case where QT_COORD_TYPE is defined (It is meant to be defined to float or double, any other type would not make sense) So now there should hopefully be only one place to change if one need to adjust the type of qreal Change-Id: I778312112603173562dbe675ab491b53d6cd2174 Reviewed-by: Jędrzej Nowacki --- src/corelib/kernel/qmetatype.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 4e75e1414b..beb7294abd 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -200,14 +200,7 @@ public: LastWidgetsType = QSizePolicy, HighestInternalId = LastWidgetsType, -// This logic must match the one in qglobal.h -#if defined(QT_COORD_TYPE) - QReal = 0, -#elif defined(QT_NO_FPU) || defined(Q_PROCESSOR_ARM) || defined(Q_OS_WINCE) - QReal = Float, -#else - QReal = Double, -#endif + QReal = sizeof(qreal) == sizeof(double) ? Double : Float, User = 256 }; -- cgit v1.2.3