From f3132cba7af8a5325884c3c04eea7b2940863a78 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 4 Apr 2010 22:47:13 +0200 Subject: Revert "Attempt at fixing Phonon build issue on Symbian." This reverts commit 7992ea34f9f1ed67d4e44f43c3a8133ae5aa3ac4. Turns out that this had already been fixed before the update to 4.4.0, but never upstreamed. Revert to the fixed version. I'll upstream the bugfix. --- .../phonon/phonon/objectdescriptionmodel.h | 38 ++++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h index b71daf45e7..8fd622f46e 100644 --- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h +++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h @@ -35,20 +35,6 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_PHONON_OBJECTDESCRIPTIONMODEL -/* MinGW 3.4.x gives an ICE when trying to instantiate one of the - ObjectDescriptionModel classes because it can't handle - half exported classes correct. gcc 4.3.x has a fix for this. - The problem also appears on Symbian with gcce. - - Because of this we need this little hack - */ -#if defined(Q_CC_GNU) && (defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)) && \ - ((__GNUC__ * 100 + __GNUC_MINOR__) < 403) -#define PHONON_EXPORT_ODM -#else -#define PHONON_EXPORT_ODM PHONON_EXPORT -#endif - namespace Phonon { class ObjectDescriptionModelDataPrivate; @@ -153,6 +139,21 @@ namespace Phonon ObjectDescriptionModelDataPrivate *const d; }; +/* Required to ensure template class vtables are exported on both symbian +and existing builds. */ +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) +// RVCT compiler (2.2.686) requires the export declaration to be on the class to export vtables +// MWC compiler works both ways +// GCCE compiler is unknown (it can't compile QtCore yet) +#define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT +#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT +#else +// Windows builds (at least) do not support export declaration on templated class +// But if you export a member function, the vtable is implicitly exported +#define PHONON_TEMPLATE_CLASS_EXPORT +#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT +#endif + /** \class ObjectDescriptionModel objectdescriptionmodel.h Phonon/ObjectDescriptionModel * \short The ObjectDescriptionModel class provides a model from * a list of ObjectDescription objects. @@ -189,16 +190,17 @@ namespace Phonon * \author Matthias Kretz */ template - class ObjectDescriptionModel : public QAbstractListModel + class PHONON_TEMPLATE_CLASS_EXPORT ObjectDescriptionModel : public QAbstractListModel { public: Q_OBJECT_CHECK + /** \internal */ - static PHONON_EXPORT const QMetaObject staticMetaObject; + static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject; /** \internal */ - PHONON_EXPORT_ODM const QMetaObject *metaObject() const; + PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject *metaObject() const; /** \internal */ - PHONON_EXPORT_ODM void *qt_metacast(const char *_clname); + PHONON_TEMPLATE_CLASS_MEMBER_EXPORT void *qt_metacast(const char *_clname); //int qt_metacall(QMetaObject::Call _c, int _id, void **_a); /** -- cgit v1.2.3