[PATCH 7/9] Fix ObjectDescriptionModel<*>::staticMetaObject initialization on Qt5.
Jon Severinsson
jon at severinsson.net
Sat Oct 6 18:15:49 UTC 2012
The internals of QMetaObject has apperently changed.
This commit is only tested, and still emmits warnings, so probably isn't enough.
---
phonon/objectdescriptionmodel.cpp | 43 ++++++++++++++++++++++++++-----------
1 fil ändrad, 30 tillägg(+), 13 borttagningar(-)
diff --git a/phonon/objectdescriptionmodel.cpp b/phonon/objectdescriptionmodel.cpp
index f708304..6ce067a 100644
--- a/phonon/objectdescriptionmodel.cpp
+++ b/phonon/objectdescriptionmodel.cpp
@@ -63,51 +63,68 @@ static const char qt_meta_stringdata_Phonon__ObjectDescriptionModel_ContainerFor
static const char qt_meta_stringdata_Phonon__ObjectDescriptionModel_VisualizationType[] = { "Phonon::VisualizationDescription\0" };
*/
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+# define QT_META_STRINGDATA(X) QTypedArrayData<char>::fromRawData(X, sizeof(X))
+#else
+# define QT_META_STRINGDATA(X) X
+#endif
+
namespace Phonon
{
template<> const QMetaObject ObjectDescriptionModel<AudioOutputDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioOutputDeviceType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioOutputDeviceType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<AudioCaptureDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioCaptureDeviceType,
- qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioCaptureDeviceType),
+ qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<VideoCaptureDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoCaptureDeviceType,
- qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoCaptureDeviceType),
+ qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<EffectType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_EffectType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_EffectType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<AudioChannelType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioChannelType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioChannelType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<SubtitleType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_SubtitleType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_SubtitleType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
/*template<> const QMetaObject ObjectDescriptionModel<VideoOutputDeviceType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoOutputDeviceType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoOutputDeviceType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<AudioCodecType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioCodecType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_AudioCodecType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<VideoCodecType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoCodecType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_VideoCodecType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<ContainerFormatType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_ContainerFormatType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_ContainerFormatType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};
template<> const QMetaObject ObjectDescriptionModel<VisualizationType>::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_Phonon__ObjectDescriptionModel_VisualizationType,
+ { &QAbstractListModel::staticMetaObject,
+ QT_META_STRINGDATA(qt_meta_stringdata_Phonon__ObjectDescriptionModel_VisualizationType),
qt_meta_data_Phonon__ObjectDescriptionModel, 0 }
};*/
--
1.7.10.4
More information about the Kde-frameworks-devel
mailing list