summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index b71daf4..8fd622f 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<foo> 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 <kretz@kde.org>
*/
template<ObjectDescriptionType type>
- 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);
/**