diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-10-16 06:17:55 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-10-16 06:17:55 (GMT) |
commit | dc66752f24442a0bb219a9a4810b47ba4ece3d5c (patch) | |
tree | 119c46d96d0bae62d3c7232b34a5d0176b7a1d59 /src/declarative/qml/qmlprivate.h | |
parent | f9a0533d2711d3efca48a80f6ff65098039d7b33 (diff) | |
download | Qt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.zip Qt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.tar.gz Qt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.tar.bz2 |
Fixes for Symbian.
Diffstat (limited to 'src/declarative/qml/qmlprivate.h')
-rw-r--r-- | src/declarative/qml/qmlprivate.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlprivate.h b/src/declarative/qml/qmlprivate.h index e821759..3e1a7e0 100644 --- a/src/declarative/qml/qmlprivate.h +++ b/src/declarative/qml/qmlprivate.h @@ -56,6 +56,19 @@ QT_MODULE(Declarative) typedef QObject *(*QmlAttachedPropertiesFunc)(QObject *); +//template<typename T> +//struct qml_hasAttached { static bool const value = false; }; + +template <typename TYPE> +class QmlTypeInfo +{ +public: + enum { + hasAttachedProperties = 0 + }; +}; + + namespace QmlPrivate { class ListInterface @@ -101,11 +114,7 @@ namespace QmlPrivate template<class From, class To> struct StaticCastSelectorClass<From, To, sizeof(int)> { -#ifndef Q_OS_SYMBIAN static inline int cast() { return (int)((intptr_t)static_cast<To *>((From *)0x10000000)) - 0x10000000; } -#else - static inline int cast() { return (int)(static_cast<To *>((From *)0x10000000)) - 0x10000000; } -#endif }; template<class From, class To> @@ -135,6 +144,12 @@ namespace QmlPrivate static bool const value = false; } }; +#elif defined(Q_OS_SYMBIAN) + template <typename T> + struct has_attachedPropertiesMember + { + static bool const value = QmlTypeInfo<T>::hasAttachedProperties; + }; #else template <typename T> class has_attachedPropertiesMember @@ -147,8 +162,8 @@ namespace QmlPrivate template <typename S> static yes_type test(Selector<sizeof(&S::qmlAttachedProperties)>*); - template <typename S> - static no_type test(...); + template <typename S> + static no_type test(...); public: static bool const value = sizeof(test<T>(0)) == sizeof(yes_type); |