From 16316f170fde30b91ed884a95d5910bd4de63782 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 8 Nov 2010 14:12:57 +1000 Subject: Don't use stdint.h in our headers since it is a C99 header. This caused problems in user applications depending upon the order of inlcusion and/or defining __STDC_LIMIT_MACROS. stdint.h is also not present in msvc, but is present in mingw. Switch to using quintptr. Task-number: QTBUG-14691 Task-number: QTBUG-13953 Reviewed-by: Bea Lam --- src/declarative/qml/qdeclarativeprivate.h | 5 +---- src/declarative/qml/qmetaobjectbuilder.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index d45ddbc..388c92e 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -55,9 +55,6 @@ #include #include -#ifndef Q_OS_WIN -#include -#endif QT_BEGIN_HEADER @@ -105,7 +102,7 @@ namespace QDeclarativePrivate template struct StaticCastSelectorClass { - static inline int cast() { return int(reinterpret_cast(static_cast(reinterpret_cast(0x10000000)))) - 0x10000000; } + static inline int cast() { return int(reinterpret_cast(static_cast(reinterpret_cast(0x10000000)))) - 0x10000000; } }; template diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index 58f8811..dfe89f8 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -41,10 +41,6 @@ #include "private/qmetaobjectbuilder_p.h" -#ifndef Q_OS_WIN -#include -#endif - QT_BEGIN_NAMESPACE /*! @@ -1264,8 +1260,8 @@ static int buildMetaObject(QMetaObjectBuilderPrivate *d, char *buf, char *str = reinterpret_cast(buf + size); if (buf) { if (relocatable) { - meta->d.stringdata = reinterpret_cast((intptr_t)size); - meta->d.data = reinterpret_cast((intptr_t)pmetaSize); + meta->d.stringdata = reinterpret_cast((quintptr)size); + meta->d.data = reinterpret_cast((quintptr)pmetaSize); } else { meta->d.stringdata = str; meta->d.data = reinterpret_cast(data); @@ -1502,8 +1498,8 @@ void QMetaObjectBuilder::fromRelocatableData(QMetaObject *output, const char *buf = data.constData(); const QMetaObject *dataMo = reinterpret_cast(buf); - intptr_t stringdataOffset = (intptr_t)dataMo->d.stringdata; - intptr_t dataOffset = (intptr_t)dataMo->d.data; + quintptr stringdataOffset = (quintptr)dataMo->d.stringdata; + quintptr dataOffset = (quintptr)dataMo->d.data; output->d.superdata = superclass; output->d.stringdata = buf + stringdataOffset; -- cgit v0.12