From 5da62aec7a2a0cac892518ee852203a3447716e1 Mon Sep 17 00:00:00 2001 From: Daniel Kristjansson Date: Mon, 25 Feb 2013 21:37:12 -0500 Subject: [PATCH] Refactor of datacontracts so the compile with Qt5. The qRegisterMetaType<> must come after Q_DECLARE_METATYPE(). --- .../datacontracts/artworkInfo.h | 15 ++++--- .../datacontracts/artworkInfoList.h | 19 +++++---- .../datacontracts/blurayInfo.h | 15 ++++--- .../datacontracts/captureCard.h | 15 ++++--- .../datacontracts/captureCardList.h | 19 +++++---- .../datacontracts/channelInfoList.h | 19 +++++---- .../datacontracts/connectionInfo.h | 23 ++++++---- .../datacontracts/databaseInfo.h | 15 ++++--- .../datacontracts/encoder.h | 19 +++++---- .../datacontracts/encoderList.h | 19 +++++---- .../datacontracts/frontendActionList.h | 15 ++++--- .../datacontracts/frontendStatus.h | 15 ++++--- .../datacontracts/labelValue.h | 15 ++++--- .../datacontracts/lineup.h | 31 ++++++++------ .../datacontracts/liveStreamInfo.h | 15 ++++--- .../datacontracts/liveStreamInfoList.h | 19 +++++---- .../datacontracts/logMessage.h | 15 ++++--- .../datacontracts/logMessageList.h | 21 ++++++---- .../datacontracts/programAndChannel.h | 42 ++++++++++--------- .../datacontracts/programGuide.h | 19 +++++---- .../datacontracts/programList.h | 19 +++++---- .../datacontracts/recRule.h | 15 ++++--- .../datacontracts/recRuleList.h | 19 +++++---- .../datacontracts/recording.h | 15 ++++--- .../datacontracts/settingList.h | 15 ++++--- .../datacontracts/storageGroupDir.h | 15 ++++--- .../datacontracts/storageGroupDirList.h | 19 +++++---- .../datacontracts/timeZoneInfo.h | 15 ++++--- .../datacontracts/versionInfo.h | 14 ++++--- .../datacontracts/videoLookupInfo.h | 31 ++++++++------ .../datacontracts/videoLookupInfoList.h | 19 +++++---- .../datacontracts/videoMetadataInfo.h | 21 ++++++---- .../datacontracts/videoMetadataInfoList.h | 19 +++++---- .../datacontracts/videoMultiplex.h | 15 ++++--- .../datacontracts/videoMultiplexList.h | 19 +++++---- .../datacontracts/videoSource.h | 15 ++++--- .../datacontracts/videoSourceList.h | 19 +++++---- .../datacontracts/wolInfo.h | 14 ++++--- .../libmythservicecontracts.pro | 2 + 39 files changed, 449 insertions(+), 256 deletions(-) diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfo.h index eb79b38ec49..7ec3758f069 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfo.h @@ -38,11 +38,7 @@ class SERVICE_PUBLIC ArtworkInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ArtworkInfo >(); - qRegisterMetaType< ArtworkInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -70,4 +66,13 @@ class SERVICE_PUBLIC ArtworkInfo : public QObject Q_DECLARE_METATYPE( DTC::ArtworkInfo ) Q_DECLARE_METATYPE( DTC::ArtworkInfo* ) +namespace DTC +{ +inline void ArtworkInfo::InitializeCustomTypes() +{ + qRegisterMetaType< ArtworkInfo >(); + qRegisterMetaType< ArtworkInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfoList.h b/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfoList.h index df78c9aae2a..fafe7cb7425 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfoList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/artworkInfoList.h @@ -38,13 +38,7 @@ class SERVICE_PUBLIC ArtworkInfoList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ArtworkInfoList >(); - qRegisterMetaType< ArtworkInfoList* >(); - - ArtworkInfo::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -81,4 +75,15 @@ class SERVICE_PUBLIC ArtworkInfoList : public QObject Q_DECLARE_METATYPE( DTC::ArtworkInfoList ) Q_DECLARE_METATYPE( DTC::ArtworkInfoList* ) +namespace DTC +{ +inline void ArtworkInfoList::InitializeCustomTypes() +{ + qRegisterMetaType< ArtworkInfoList >(); + qRegisterMetaType< ArtworkInfoList* >(); + + ArtworkInfo::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/blurayInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/blurayInfo.h index 8d95250e4a9..5312d1d0258 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/blurayInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/blurayInfo.h @@ -70,11 +70,7 @@ class SERVICE_PUBLIC BlurayInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< BlurayInfo >(); - qRegisterMetaType< BlurayInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -108,4 +104,13 @@ class SERVICE_PUBLIC BlurayInfo : public QObject Q_DECLARE_METATYPE( DTC::BlurayInfo ) Q_DECLARE_METATYPE( DTC::BlurayInfo* ) +namespace DTC +{ +inline void BlurayInfo::InitializeCustomTypes() +{ + qRegisterMetaType< BlurayInfo >(); + qRegisterMetaType< BlurayInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h b/mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h index 07f6b37d7b7..b8831322067 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h @@ -80,11 +80,7 @@ class SERVICE_PUBLIC CaptureCard : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< CaptureCard >(); - qRegisterMetaType< CaptureCard* >(); - } + static inline void InitializeCustomTypes(); public: @@ -140,4 +136,13 @@ class SERVICE_PUBLIC CaptureCard : public QObject Q_DECLARE_METATYPE( DTC::CaptureCard ) Q_DECLARE_METATYPE( DTC::CaptureCard* ) +namespace DTC +{ +inline void CaptureCard::InitializeCustomTypes() +{ + qRegisterMetaType< CaptureCard >(); + qRegisterMetaType< CaptureCard* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/captureCardList.h b/mythtv/libs/libmythservicecontracts/datacontracts/captureCardList.h index 5088b505295..1a27cd294a2 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/captureCardList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/captureCardList.h @@ -37,13 +37,7 @@ class SERVICE_PUBLIC CaptureCardList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< CaptureCardList >(); - qRegisterMetaType< CaptureCardList* >(); - - CaptureCard::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -80,4 +74,15 @@ class SERVICE_PUBLIC CaptureCardList : public QObject Q_DECLARE_METATYPE( DTC::CaptureCardList ) Q_DECLARE_METATYPE( DTC::CaptureCardList* ) +namespace DTC +{ +inline void CaptureCardList::InitializeCustomTypes() +{ + qRegisterMetaType< CaptureCardList >(); + qRegisterMetaType< CaptureCardList* >(); + + CaptureCard::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/channelInfoList.h b/mythtv/libs/libmythservicecontracts/datacontracts/channelInfoList.h index 2a361df4643..d6b367423bf 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/channelInfoList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/channelInfoList.h @@ -46,13 +46,7 @@ class SERVICE_PUBLIC ChannelInfoList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ChannelInfoList >(); - qRegisterMetaType< ChannelInfoList* >(); - - ChannelInfo::InitializeCustomTypes(); - } + static void InitializeCustomTypes(); public: @@ -99,4 +93,15 @@ class SERVICE_PUBLIC ChannelInfoList : public QObject Q_DECLARE_METATYPE( DTC::ChannelInfoList ) Q_DECLARE_METATYPE( DTC::ChannelInfoList* ) +namespace DTC +{ +inline void ChannelInfoList::InitializeCustomTypes() +{ + qRegisterMetaType< ChannelInfoList >(); + qRegisterMetaType< ChannelInfoList* >(); + + ChannelInfo::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/connectionInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/connectionInfo.h index b1235b5281e..0d4da9c52f3 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/connectionInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/connectionInfo.h @@ -37,15 +37,7 @@ class SERVICE_PUBLIC ConnectionInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ConnectionInfo >(); - qRegisterMetaType< ConnectionInfo* >(); - - VersionInfo ::InitializeCustomTypes(); - DatabaseInfo::InitializeCustomTypes(); - WOLInfo ::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -88,4 +80,17 @@ typedef ConnectionInfo* ConnectionInfoPtr; Q_DECLARE_METATYPE( DTC::ConnectionInfo ) Q_DECLARE_METATYPE( DTC::ConnectionInfo* ) +namespace DTC +{ +inline void ConnectionInfo::InitializeCustomTypes() +{ + qRegisterMetaType< ConnectionInfo >(); + qRegisterMetaType< ConnectionInfo* >(); + + VersionInfo ::InitializeCustomTypes(); + DatabaseInfo::InitializeCustomTypes(); + WOLInfo ::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/databaseInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/databaseInfo.h index c807c5417d6..5db43468476 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/databaseInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/databaseInfo.h @@ -46,11 +46,7 @@ class SERVICE_PUBLIC DatabaseInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< DatabaseInfo >(); - qRegisterMetaType< DatabaseInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -88,4 +84,13 @@ typedef DatabaseInfo * DatabaseInfoPtr; Q_DECLARE_METATYPE( DTC::DatabaseInfo ) Q_DECLARE_METATYPE( DTC::DatabaseInfo* ) +namespace DTC +{ +inline void DatabaseInfo::InitializeCustomTypes() +{ + qRegisterMetaType< DatabaseInfo >(); + qRegisterMetaType< DatabaseInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/encoder.h b/mythtv/libs/libmythservicecontracts/datacontracts/encoder.h index 5d6be93cbec..a0b8ec11d9e 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/encoder.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/encoder.h @@ -50,13 +50,7 @@ class SERVICE_PUBLIC Encoder : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< Encoder >(); - qRegisterMetaType< Encoder* >(); - - Program::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -99,4 +93,15 @@ class SERVICE_PUBLIC Encoder : public QObject Q_DECLARE_METATYPE( DTC::Encoder ) Q_DECLARE_METATYPE( DTC::Encoder* ) +namespace DTC +{ +inline void Encoder::InitializeCustomTypes() +{ + qRegisterMetaType< Encoder >(); + qRegisterMetaType< Encoder* >(); + + Program::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/encoderList.h b/mythtv/libs/libmythservicecontracts/datacontracts/encoderList.h index 689c54ecc82..246fa97d4e2 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/encoderList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/encoderList.h @@ -37,13 +37,7 @@ class SERVICE_PUBLIC EncoderList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< EncoderList >(); - qRegisterMetaType< EncoderList* >(); - - Encoder::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -80,4 +74,15 @@ class SERVICE_PUBLIC EncoderList : public QObject Q_DECLARE_METATYPE( DTC::EncoderList ) Q_DECLARE_METATYPE( DTC::EncoderList* ) +namespace DTC +{ +inline void EncoderList::InitializeCustomTypes() +{ + qRegisterMetaType< EncoderList >(); + qRegisterMetaType< EncoderList* >(); + + Encoder::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/frontendActionList.h b/mythtv/libs/libmythservicecontracts/datacontracts/frontendActionList.h index 1c3ee3292d2..a6d88f5703f 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/frontendActionList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/frontendActionList.h @@ -18,11 +18,7 @@ namespace DTC PROPERTYIMP_RO_REF(QVariantMap, ActionList) public: - static void InitializeCustomTypes() - { - qRegisterMetaType(); - qRegisterMetaType(); - } + static inline void InitializeCustomTypes(); public: FrontendActionList(QObject *parent = 0) : QObject(parent) @@ -44,4 +40,13 @@ namespace DTC Q_DECLARE_METATYPE(DTC::FrontendActionList) Q_DECLARE_METATYPE(DTC::FrontendActionList*) +namespace DTC +{ +inline void FrontendActionList::InitializeCustomTypes() +{ + qRegisterMetaType(); + qRegisterMetaType(); +} +} + #endif // FRONTENDACTIONLIST_H diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/frontendStatus.h b/mythtv/libs/libmythservicecontracts/datacontracts/frontendStatus.h index a5d336d0d06..3acb68154b1 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/frontendStatus.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/frontendStatus.h @@ -27,11 +27,7 @@ namespace DTC PROPERTYIMP_RO_REF(QVariantMap, AudioTracks) public: - static void InitializeCustomTypes() - { - qRegisterMetaType(); - qRegisterMetaType(); - } + static inline void InitializeCustomTypes(); public: FrontendStatus(QObject *parent = 0) : QObject(parent) @@ -80,4 +76,13 @@ namespace DTC Q_DECLARE_METATYPE(DTC::FrontendStatus) Q_DECLARE_METATYPE(DTC::FrontendStatus*) +namespace DTC +{ +inline void FrontendStatus::InitializeCustomTypes() +{ + qRegisterMetaType(); + qRegisterMetaType(); +} +} + #endif // FRONTENDSTATUS_H diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/labelValue.h b/mythtv/libs/libmythservicecontracts/datacontracts/labelValue.h index 341625cfc35..0d2ddac5394 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/labelValue.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/labelValue.h @@ -40,11 +40,7 @@ class SERVICE_PUBLIC LabelValue : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LabelValue >(); - qRegisterMetaType< LabelValue* >(); - } + static inline void InitializeCustomTypes(); public: @@ -78,4 +74,13 @@ class SERVICE_PUBLIC LabelValue : public QObject Q_DECLARE_METATYPE( DTC::LabelValue ) Q_DECLARE_METATYPE( DTC::LabelValue* ) +namespace DTC +{ +inline void LabelValue::InitializeCustomTypes() +{ + qRegisterMetaType< LabelValue >(); + qRegisterMetaType< LabelValue* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/lineup.h b/mythtv/libs/libmythservicecontracts/datacontracts/lineup.h index 13c95857c20..43b8678815f 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/lineup.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/lineup.h @@ -42,11 +42,7 @@ class SERVICE_PUBLIC Lineup : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< Lineup >(); - qRegisterMetaType< Lineup* >(); - } + static inline void InitializeCustomTypes(); public: @@ -87,13 +83,7 @@ class SERVICE_PUBLIC LineupList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LineupList >(); - qRegisterMetaType< LineupList* >(); - - Lineup::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -133,4 +123,21 @@ Q_DECLARE_METATYPE( DTC::LineupList* ) Q_DECLARE_METATYPE( DTC::Lineup ) Q_DECLARE_METATYPE( DTC::Lineup* ) +namespace DTC +{ +inline void Lineup::InitializeCustomTypes() +{ + qRegisterMetaType< Lineup >(); + qRegisterMetaType< Lineup* >(); +} + +inline void LineupList::InitializeCustomTypes() +{ + qRegisterMetaType< LineupList >(); + qRegisterMetaType< LineupList* >(); + + Lineup::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfo.h index c4538b20241..89065238f69 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfo.h @@ -67,11 +67,7 @@ class SERVICE_PUBLIC LiveStreamInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LiveStreamInfo >(); - qRegisterMetaType< LiveStreamInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -133,4 +129,13 @@ class SERVICE_PUBLIC LiveStreamInfo : public QObject Q_DECLARE_METATYPE( DTC::LiveStreamInfo ) Q_DECLARE_METATYPE( DTC::LiveStreamInfo* ) +namespace DTC +{ +inline void LiveStreamInfo::InitializeCustomTypes() +{ + qRegisterMetaType< LiveStreamInfo >(); + qRegisterMetaType< LiveStreamInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfoList.h b/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfoList.h index d2f5416a6ba..fd5c418d8f7 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfoList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfoList.h @@ -27,13 +27,7 @@ class SERVICE_PUBLIC LiveStreamInfoList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LiveStreamInfoList >(); - qRegisterMetaType< LiveStreamInfoList* >(); - - LiveStreamInfo::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -70,4 +64,15 @@ class SERVICE_PUBLIC LiveStreamInfoList : public QObject Q_DECLARE_METATYPE( DTC::LiveStreamInfoList ) Q_DECLARE_METATYPE( DTC::LiveStreamInfoList* ) +namespace DTC +{ +inline void LiveStreamInfoList::InitializeCustomTypes() +{ + qRegisterMetaType< LiveStreamInfoList >(); + qRegisterMetaType< LiveStreamInfoList* >(); + + LiveStreamInfo::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/logMessage.h b/mythtv/libs/libmythservicecontracts/datacontracts/logMessage.h index 03d5a1115ea..0c7ff084684 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/logMessage.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/logMessage.h @@ -59,11 +59,7 @@ class SERVICE_PUBLIC LogMessage : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LogMessage >(); - qRegisterMetaType< LogMessage* >(); - } + static inline void InitializeCustomTypes(); public: @@ -109,4 +105,13 @@ class SERVICE_PUBLIC LogMessage : public QObject Q_DECLARE_METATYPE( DTC::LogMessage ) Q_DECLARE_METATYPE( DTC::LogMessage* ) +namespace DTC +{ +inline void LogMessage::InitializeCustomTypes() +{ + qRegisterMetaType< LogMessage >(); + qRegisterMetaType< LogMessage* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/logMessageList.h b/mythtv/libs/libmythservicecontracts/datacontracts/logMessageList.h index 0bfbacd1129..d096d8876ab 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/logMessageList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/logMessageList.h @@ -34,14 +34,7 @@ class SERVICE_PUBLIC LogMessageList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< LogMessageList >(); - qRegisterMetaType< LogMessageList* >(); - - LabelValue::InitializeCustomTypes(); - LogMessage::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -105,4 +98,16 @@ class SERVICE_PUBLIC LogMessageList : public QObject Q_DECLARE_METATYPE( DTC::LogMessageList ) Q_DECLARE_METATYPE( DTC::LogMessageList* ) +namespace DTC +{ +inline void LogMessageList::InitializeCustomTypes() +{ + qRegisterMetaType< LogMessageList >(); + qRegisterMetaType< LogMessageList* >(); + + LabelValue::InitializeCustomTypes(); + LogMessage::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/programAndChannel.h b/mythtv/libs/libmythservicecontracts/datacontracts/programAndChannel.h index 1b3727fadd0..feec62081d7 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/programAndChannel.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/programAndChannel.h @@ -222,20 +222,7 @@ class SERVICE_PUBLIC Program : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< Program >(); - qRegisterMetaType< Program* >(); - - if (QMetaType::type( "DTC::ChannelInfo" ) == 0) - ChannelInfo::InitializeCustomTypes(); - - if (QMetaType::type( "DTC::RecordingInfo" ) == 0) - RecordingInfo::InitializeCustomTypes(); - - if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0) - ArtworkInfoList::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -318,6 +305,16 @@ inline Program *ChannelInfo::AddNewProgram() return pObject; } +} // namespace DTC + +Q_DECLARE_METATYPE( DTC::Program ) +Q_DECLARE_METATYPE( DTC::Program* ) + +Q_DECLARE_METATYPE( DTC::ChannelInfo ) +Q_DECLARE_METATYPE( DTC::ChannelInfo* ) + +namespace DTC +{ inline void ChannelInfo::InitializeCustomTypes() { qRegisterMetaType< ChannelInfo >(); @@ -327,13 +324,20 @@ inline void ChannelInfo::InitializeCustomTypes() Program::InitializeCustomTypes(); } +inline void Program::InitializeCustomTypes() +{ + qRegisterMetaType< Program >(); + qRegisterMetaType< Program* >(); -} // namespace DTC + if (QMetaType::type( "DTC::ChannelInfo" ) == 0) + ChannelInfo::InitializeCustomTypes(); -Q_DECLARE_METATYPE( DTC::Program ) -Q_DECLARE_METATYPE( DTC::Program* ) + if (QMetaType::type( "DTC::RecordingInfo" ) == 0) + RecordingInfo::InitializeCustomTypes(); -Q_DECLARE_METATYPE( DTC::ChannelInfo ) -Q_DECLARE_METATYPE( DTC::ChannelInfo* ) + if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0) + ArtworkInfoList::InitializeCustomTypes(); +} +} #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/programGuide.h b/mythtv/libs/libmythservicecontracts/datacontracts/programGuide.h index dd4c9623555..c25e3312918 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/programGuide.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/programGuide.h @@ -73,13 +73,7 @@ class SERVICE_PUBLIC ProgramGuide : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ProgramGuide >(); - qRegisterMetaType< ProgramGuide* >(); - - ChannelInfo::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -132,4 +126,15 @@ class SERVICE_PUBLIC ProgramGuide : public QObject Q_DECLARE_METATYPE( DTC::ProgramGuide ) Q_DECLARE_METATYPE( DTC::ProgramGuide* ) +namespace DTC +{ +inline void ProgramGuide::InitializeCustomTypes() +{ + qRegisterMetaType< ProgramGuide >(); + qRegisterMetaType< ProgramGuide* >(); + + ChannelInfo::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/programList.h b/mythtv/libs/libmythservicecontracts/datacontracts/programList.h index 16460acf547..8c72b3d0848 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/programList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/programList.h @@ -54,13 +54,7 @@ class SERVICE_PUBLIC ProgramList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ProgramList >(); - qRegisterMetaType< ProgramList* >(); - - Program::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -107,4 +101,15 @@ class SERVICE_PUBLIC ProgramList : public QObject Q_DECLARE_METATYPE( DTC::ProgramList ) Q_DECLARE_METATYPE( DTC::ProgramList* ) +namespace DTC +{ +inline void ProgramList::InitializeCustomTypes() +{ + qRegisterMetaType< ProgramList >(); + qRegisterMetaType< ProgramList* >(); + + Program::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/recRule.h b/mythtv/libs/libmythservicecontracts/datacontracts/recRule.h index 59ef7e4f7f1..7626607560c 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/recRule.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/recRule.h @@ -123,11 +123,7 @@ class SERVICE_PUBLIC RecRule : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< RecRule >(); - qRegisterMetaType< RecRule* >(); - } + static inline void InitializeCustomTypes(); public: @@ -224,4 +220,13 @@ class SERVICE_PUBLIC RecRule : public QObject Q_DECLARE_METATYPE( DTC::RecRule ) Q_DECLARE_METATYPE( DTC::RecRule* ) +namespace DTC +{ +inline void RecRule::InitializeCustomTypes() +{ + qRegisterMetaType< RecRule >(); + qRegisterMetaType< RecRule* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/recRuleList.h b/mythtv/libs/libmythservicecontracts/datacontracts/recRuleList.h index c5bd10a6c99..ea55a644988 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/recRuleList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/recRuleList.h @@ -43,13 +43,7 @@ class SERVICE_PUBLIC RecRuleList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< RecRuleList >(); - qRegisterMetaType< RecRuleList* >(); - - RecRule::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -90,4 +84,15 @@ class SERVICE_PUBLIC RecRuleList : public QObject Q_DECLARE_METATYPE( DTC::RecRuleList ) Q_DECLARE_METATYPE( DTC::RecRuleList* ) +namespace DTC +{ +inline void RecRuleList::InitializeCustomTypes() +{ + qRegisterMetaType< RecRuleList >(); + qRegisterMetaType< RecRuleList* >(); + + RecRule::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/recording.h b/mythtv/libs/libmythservicecontracts/datacontracts/recording.h index 24ff0748e40..61570860a87 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/recording.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/recording.h @@ -70,11 +70,7 @@ class SERVICE_PUBLIC RecordingInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< RecordingInfo >(); - qRegisterMetaType< RecordingInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -120,4 +116,13 @@ class SERVICE_PUBLIC RecordingInfo : public QObject Q_DECLARE_METATYPE( DTC::RecordingInfo ) Q_DECLARE_METATYPE( DTC::RecordingInfo* ) +namespace DTC +{ +inline void RecordingInfo::InitializeCustomTypes() +{ + qRegisterMetaType< RecordingInfo >(); + qRegisterMetaType< RecordingInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/settingList.h b/mythtv/libs/libmythservicecontracts/datacontracts/settingList.h index a53bab3d227..eb497f8b20b 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/settingList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/settingList.h @@ -38,11 +38,7 @@ class SERVICE_PUBLIC SettingList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< SettingList >(); - qRegisterMetaType< SettingList* >(); - } + static inline void InitializeCustomTypes(); public: @@ -63,4 +59,13 @@ class SERVICE_PUBLIC SettingList : public QObject Q_DECLARE_METATYPE( DTC::SettingList ) Q_DECLARE_METATYPE( DTC::SettingList* ) +namespace DTC +{ +inline void SettingList::InitializeCustomTypes() +{ + qRegisterMetaType< SettingList >(); + qRegisterMetaType< SettingList* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDir.h b/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDir.h index 6693551511e..8c38b1ffa69 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDir.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDir.h @@ -28,11 +28,7 @@ class SERVICE_PUBLIC StorageGroupDir : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< StorageGroupDir >(); - qRegisterMetaType< StorageGroupDir* >(); - } + static inline void InitializeCustomTypes(); public: @@ -61,4 +57,13 @@ class SERVICE_PUBLIC StorageGroupDir : public QObject Q_DECLARE_METATYPE( DTC::StorageGroupDir ) Q_DECLARE_METATYPE( DTC::StorageGroupDir* ) +namespace DTC +{ +inline void StorageGroupDir::InitializeCustomTypes() +{ + qRegisterMetaType< StorageGroupDir >(); + qRegisterMetaType< StorageGroupDir* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDirList.h b/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDirList.h index 34d28bd0dca..b321d5864d9 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDirList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/storageGroupDirList.h @@ -27,13 +27,7 @@ class SERVICE_PUBLIC StorageGroupDirList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< StorageGroupDirList >(); - qRegisterMetaType< StorageGroupDirList* >(); - - StorageGroupDir::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -70,4 +64,15 @@ class SERVICE_PUBLIC StorageGroupDirList : public QObject Q_DECLARE_METATYPE( DTC::StorageGroupDirList ) Q_DECLARE_METATYPE( DTC::StorageGroupDirList* ) +namespace DTC +{ +inline void StorageGroupDirList::InitializeCustomTypes() +{ + qRegisterMetaType< StorageGroupDirList >(); + qRegisterMetaType< StorageGroupDirList* >(); + + StorageGroupDir::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/timeZoneInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/timeZoneInfo.h index 5140c4b1f27..88b6968771f 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/timeZoneInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/timeZoneInfo.h @@ -35,11 +35,7 @@ class SERVICE_PUBLIC TimeZoneInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< TimeZoneInfo >(); - qRegisterMetaType< TimeZoneInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -69,4 +65,13 @@ class SERVICE_PUBLIC TimeZoneInfo : public QObject Q_DECLARE_METATYPE( DTC::TimeZoneInfo ) Q_DECLARE_METATYPE( DTC::TimeZoneInfo* ) +namespace DTC +{ +inline void TimeZoneInfo::InitializeCustomTypes() +{ + qRegisterMetaType< TimeZoneInfo >(); + qRegisterMetaType< TimeZoneInfo* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/versionInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/versionInfo.h index 9d2feaaa8f1..000fccacfa6 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/versionInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/versionInfo.h @@ -40,11 +40,7 @@ class SERVICE_PUBLIC VersionInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VersionInfo >(); - qRegisterMetaType< VersionInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -80,5 +76,13 @@ typedef VersionInfo* VersionInfoPtr; Q_DECLARE_METATYPE( DTC::VersionInfo ) Q_DECLARE_METATYPE( DTC::VersionInfo* ) +namespace DTC +{ +inline void VersionInfo::InitializeCustomTypes() +{ + qRegisterMetaType< VersionInfo >(); + qRegisterMetaType< VersionInfo* >(); +} +} #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfo.h index 2f3e845c253..0af753f5f92 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfo.h @@ -41,11 +41,7 @@ class SERVICE_PUBLIC ArtworkItem : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< ArtworkItem >(); - qRegisterMetaType< ArtworkItem* >(); - } + static inline void InitializeCustomTypes(); public: @@ -128,13 +124,7 @@ class SERVICE_PUBLIC VideoLookup : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoLookup >(); - qRegisterMetaType< VideoLookup* >(); - - ArtworkItem::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -185,4 +175,21 @@ Q_DECLARE_METATYPE( DTC::VideoLookup* ) Q_DECLARE_METATYPE( DTC::ArtworkItem ) Q_DECLARE_METATYPE( DTC::ArtworkItem* ) +namespace DTC +{ +inline void ArtworkItem::InitializeCustomTypes() +{ + qRegisterMetaType< ArtworkItem >(); + qRegisterMetaType< ArtworkItem* >(); +} + +inline void VideoLookup::InitializeCustomTypes() +{ + qRegisterMetaType< VideoLookup >(); + qRegisterMetaType< VideoLookup* >(); + + ArtworkItem::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfoList.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfoList.h index 10bb541bc0f..aaf99256c00 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfoList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoLookupInfoList.h @@ -48,13 +48,7 @@ class SERVICE_PUBLIC VideoLookupList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoLookupList >(); - qRegisterMetaType< VideoLookupList* >(); - - VideoLookup::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -97,4 +91,15 @@ class SERVICE_PUBLIC VideoLookupList : public QObject Q_DECLARE_METATYPE( DTC::VideoLookupList ) Q_DECLARE_METATYPE( DTC::VideoLookupList* ) +namespace DTC +{ +inline void VideoLookupList::InitializeCustomTypes() +{ + qRegisterMetaType< VideoLookupList >(); + qRegisterMetaType< VideoLookupList* >(); + + VideoLookup::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfo.h index 30296ce231b..f632e51b6de 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfo.h @@ -99,14 +99,7 @@ class SERVICE_PUBLIC VideoMetadataInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoMetadataInfo >(); - qRegisterMetaType< VideoMetadataInfo* >(); - - if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0) - ArtworkInfoList::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -148,4 +141,16 @@ class SERVICE_PUBLIC VideoMetadataInfo : public QObject Q_DECLARE_METATYPE( DTC::VideoMetadataInfo ) Q_DECLARE_METATYPE( DTC::VideoMetadataInfo* ) +namespace DTC +{ +inline void VideoMetadataInfo::InitializeCustomTypes() +{ + qRegisterMetaType< VideoMetadataInfo >(); + qRegisterMetaType< VideoMetadataInfo* >(); + + if (QMetaType::type( "DTC::ArtworkInfoList" ) == 0) + ArtworkInfoList::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfoList.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfoList.h index 92f07f22f0a..b6c6f30b609 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfoList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoMetadataInfoList.h @@ -56,13 +56,7 @@ class SERVICE_PUBLIC VideoMetadataInfoList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoMetadataInfoList >(); - qRegisterMetaType< VideoMetadataInfoList* >(); - - VideoMetadataInfo::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -111,4 +105,15 @@ class SERVICE_PUBLIC VideoMetadataInfoList : public QObject Q_DECLARE_METATYPE( DTC::VideoMetadataInfoList ) Q_DECLARE_METATYPE( DTC::VideoMetadataInfoList* ) +namespace DTC +{ +inline void VideoMetadataInfoList::InitializeCustomTypes() +{ + qRegisterMetaType< VideoMetadataInfoList >(); + qRegisterMetaType< VideoMetadataInfoList* >(); + + VideoMetadataInfo::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplex.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplex.h index 5ed5fe3ff9c..aad7f9adc2b 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplex.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplex.h @@ -69,11 +69,7 @@ class SERVICE_PUBLIC VideoMultiplex : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoMultiplex >(); - qRegisterMetaType< VideoMultiplex* >(); - } + static inline void InitializeCustomTypes(); public: @@ -122,4 +118,13 @@ class SERVICE_PUBLIC VideoMultiplex : public QObject Q_DECLARE_METATYPE( DTC::VideoMultiplex ) Q_DECLARE_METATYPE( DTC::VideoMultiplex* ) +namespace DTC +{ +inline void VideoMultiplex::InitializeCustomTypes() +{ + qRegisterMetaType< VideoMultiplex >(); + qRegisterMetaType< VideoMultiplex* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplexList.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplexList.h index 9147d182536..9b26fd4f156 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplexList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoMultiplexList.h @@ -47,13 +47,7 @@ class SERVICE_PUBLIC VideoMultiplexList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoMultiplexList >(); - qRegisterMetaType< VideoMultiplexList* >(); - - VideoMultiplex::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -94,4 +88,15 @@ class SERVICE_PUBLIC VideoMultiplexList : public QObject Q_DECLARE_METATYPE( DTC::VideoMultiplexList ) Q_DECLARE_METATYPE( DTC::VideoMultiplexList* ) +namespace DTC +{ +inline void VideoMultiplexList::InitializeCustomTypes() +{ + qRegisterMetaType< VideoMultiplexList >(); + qRegisterMetaType< VideoMultiplexList* >(); + + VideoMultiplex::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoSource.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoSource.h index 070695d8fa2..9cb77b4658e 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoSource.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoSource.h @@ -40,11 +40,7 @@ class SERVICE_PUBLIC VideoSource : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoSource >(); - qRegisterMetaType< VideoSource* >(); - } + static inline void InitializeCustomTypes(); public: @@ -79,4 +75,13 @@ class SERVICE_PUBLIC VideoSource : public QObject Q_DECLARE_METATYPE( DTC::VideoSource ) Q_DECLARE_METATYPE( DTC::VideoSource* ) +namespace DTC +{ +inline void VideoSource::InitializeCustomTypes() +{ + qRegisterMetaType< VideoSource >(); + qRegisterMetaType< VideoSource* >(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/videoSourceList.h b/mythtv/libs/libmythservicecontracts/datacontracts/videoSourceList.h index 86902718833..53e1cd28001 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/videoSourceList.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/videoSourceList.h @@ -37,13 +37,7 @@ class SERVICE_PUBLIC VideoSourceList : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< VideoSourceList >(); - qRegisterMetaType< VideoSourceList* >(); - - VideoSource::InitializeCustomTypes(); - } + static inline void InitializeCustomTypes(); public: @@ -84,4 +78,15 @@ class SERVICE_PUBLIC VideoSourceList : public QObject Q_DECLARE_METATYPE( DTC::VideoSourceList ) Q_DECLARE_METATYPE( DTC::VideoSourceList* ) +namespace DTC +{ +inline void VideoSourceList::InitializeCustomTypes() +{ + qRegisterMetaType< VideoSourceList >(); + qRegisterMetaType< VideoSourceList* >(); + + VideoSource::InitializeCustomTypes(); +} +} + #endif diff --git a/mythtv/libs/libmythservicecontracts/datacontracts/wolInfo.h b/mythtv/libs/libmythservicecontracts/datacontracts/wolInfo.h index d39162c4fc2..a4ca222c8d0 100644 --- a/mythtv/libs/libmythservicecontracts/datacontracts/wolInfo.h +++ b/mythtv/libs/libmythservicecontracts/datacontracts/wolInfo.h @@ -38,11 +38,7 @@ class SERVICE_PUBLIC WOLInfo : public QObject public: - static void InitializeCustomTypes() - { - qRegisterMetaType< WOLInfo >(); - qRegisterMetaType< WOLInfo* >(); - } + static inline void InitializeCustomTypes(); public: @@ -75,5 +71,13 @@ typedef WOLInfo* WOLInfoPtr; Q_DECLARE_METATYPE( DTC::WOLInfo ) Q_DECLARE_METATYPE( DTC::WOLInfo* ) +namespace DTC +{ +inline void WOLInfo::InitializeCustomTypes() +{ + qRegisterMetaType< WOLInfo >(); + qRegisterMetaType< WOLInfo* >(); +} +} #endif diff --git a/mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro b/mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro index 638aa949621..73730984158 100644 --- a/mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro +++ b/mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro @@ -1,5 +1,7 @@ include ( ../../settings.pro ) +QT += script + TEMPLATE = lib TARGET = mythservicecontracts-$$LIBVERSION CONFIG += thread dll