From 16aeed255560b5e9479efe9b74517fb647922694 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 9 Sep 2010 10:51:23 +0200 Subject: Remove unsupported code from qobject.h for MSVC < .NET 2003 Reviewed-By: Joerg Bornemann --- src/corelib/kernel/qobject.h | 91 -------------------------------------------- 1 file changed, 91 deletions(-) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index c533fa1..b5c772e 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -325,95 +325,6 @@ Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QString const QMetaObject &mo, QList *list); Q_CORE_EXPORT QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo); -#if defined Q_CC_MSVC && _MSC_VER < 1300 - -template -inline T qFindChild(const QObject *o, const QString &name, T) -{ return static_cast(qt_qFindChild_helper(o, name, ((T)0)->staticMetaObject)); } - -template -inline QList qFindChildren(const QObject *o, const QString &name, T) -{ - QList list; - union { - QList *typedList; - QList *voidList; - } u; - u.typedList = &list; - qt_qFindChildren_helper(o, name, 0, ((T)0)->staticMetaObject, u.voidList); - return list; -} - -template -inline T qFindChild(const QObject *o, const QString &name) -{ return qFindChild(o, name, T(0)); } - -template -inline T qFindChild(const QObject *o) -{ return qFindChild(o, QString(), T(0)); } - -template -inline QList qFindChildren(const QObject *o, const QString &name) -{ return qFindChildren(o, name, T(0)); } - -template -inline QList qFindChildren(const QObject *o) -{ return qFindChildren(o, QString(), T(0)); } - -#ifndef QT_NO_REGEXP -template -inline QList qFindChildren(const QObject *o, const QRegExp &re, T) -{ - QList list; - union { - QList *typedList; - QList *voidList; - } u; - u.typedList = &list; - qt_qFindChildren_helper(o, 0, &re, ((T)0)->staticMetaObject, u.voidList); - return list; -} - -template -inline QList qFindChildren(const QObject *o, const QRegExp &re) -{ return qFindChildren(o, re, T(0)); } - -#endif - -#ifdef Q_MOC_RUN -# define Q_DECLARE_INTERFACE(IFace, IId) Q_DECLARE_INTERFACE(IFace, IId) -#endif // Q_MOC_RUN - - -template inline const char * qobject_interface_iid() -{ return 0; } - -template inline T qobject_cast_helper(QObject *object, T) -{ return static_cast(((T)0)->staticMetaObject.cast(object)); } - -template inline T qobject_cast_helper(const QObject *object, T) -{ return static_cast(const_cast(((T)0)->staticMetaObject.cast(const_cast(object)))); } - -template -inline T qobject_cast(QObject *object) -{ return qobject_cast_helper(object, T(0)); } - -template -inline T qobject_cast(const QObject *object) -{ return qobject_cast_helper(object, T(0)); } - -#ifndef Q_MOC_RUN -# define Q_DECLARE_INTERFACE(IFace, IId) \ - template <> inline const char *qobject_interface_iid() \ - { return IId; } \ - template <> inline IFace *qobject_cast_helper(QObject *object, IFace *) \ - { return (IFace *)(object ? object->qt_metacast(IId) : 0); } \ - template <> inline IFace *qobject_cast_helper(const QObject *object, IFace *) \ - { return (IFace *)(object ? const_cast(object)->qt_metacast(IId) : 0); } -#endif // Q_MOC_RUN - -#else - template inline T qFindChild(const QObject *o, const QString &name) { return static_cast(qt_qFindChild_helper(o, name, reinterpret_cast(0)->staticMetaObject)); } @@ -478,8 +389,6 @@ template inline const char * qobject_interface_iid() { return reinterpret_cast((object ? const_cast(object)->qt_metacast(IId) : 0)); } #endif // Q_MOC_RUN -#endif - #ifndef QT_NO_DEBUG_STREAM Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *); #endif -- cgit v0.12