summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-10-08 09:46:05 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-10-08 12:53:09 (GMT)
commit00b198b1cdf48bd88d61bb256ec3ff455735e38c (patch)
treec8325deb0459dd1cff0a2bc0654fd8a654ee6af3 /src
parente1e323aae504dfa770b447b63754f374fe82e5e9 (diff)
downloadQt-00b198b1cdf48bd88d61bb256ec3ff455735e38c.zip
Qt-00b198b1cdf48bd88d61bb256ec3ff455735e38c.tar.gz
Qt-00b198b1cdf48bd88d61bb256ec3ff455735e38c.tar.bz2
Conservative fix for link error with ARM RVCT compiler on symbian sbsv2
Not exporting the whole class prevents the capabilities example from linking, because the vtable is not exported. However windows builds don't support export of templated class, and export the vtable implicitly when there is an exported member function. Task-number: QTBUG-4593 Reviewed-by: Thierry Bastian
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h23
-rw-r--r--src/s60installs/eabi/phononu.def20
2 files changed, 29 insertions, 14 deletions
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index ba3cb42..a3c72b2 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
@@ -139,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.
@@ -175,7 +190,7 @@ 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
@@ -188,11 +203,11 @@ namespace Phonon
*/
#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4
/** \internal */
- static PHONON_EXPORT const QMetaObject staticMetaObject;
+ static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject;
/** \internal */
- PHONON_EXPORT const QMetaObject *metaObject() const;
+ PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject *metaObject() const;
/** \internal */
- PHONON_EXPORT 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);
#endif
diff --git a/src/s60installs/eabi/phononu.def b/src/s60installs/eabi/phononu.def
index d407ba4..d70942c 100644
--- a/src/s60installs/eabi/phononu.def
+++ b/src/s60installs/eabi/phononu.def
@@ -495,11 +495,11 @@ EXPORTS
_ZTIN6Phonon19AbstractVideoOutputE @ 494 NONAME
_ZTIN6Phonon19BackendCapabilities8NotifierE @ 495 NONAME ABSENT
_ZTIN6Phonon22MediaControllerPrivateE @ 496 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME ABSENT
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME
_ZTIN6Phonon24VolumeFaderEffectPrivateE @ 502 NONAME ABSENT
_ZTIN6Phonon26AbstractAudioOutputPrivateE @ 503 NONAME ABSENT
_ZTIN6Phonon26AbstractMediaStreamPrivateE @ 504 NONAME
@@ -532,11 +532,11 @@ EXPORTS
_ZTVN6Phonon19AbstractVideoOutputE @ 531 NONAME
_ZTVN6Phonon19BackendCapabilities8NotifierE @ 532 NONAME ABSENT
_ZTVN6Phonon22MediaControllerPrivateE @ 533 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME ABSENT
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME
_ZTVN6Phonon24VolumeFaderEffectPrivateE @ 539 NONAME ABSENT
_ZTVN6Phonon26AbstractAudioOutputPrivateE @ 540 NONAME ABSENT
_ZTVN6Phonon26AbstractMediaStreamPrivateE @ 541 NONAME