From 46572cc5d1681a016827b64fc2f8e8fa0e26f837 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 26 Jul 2013 12:22:23 +0200 Subject: [PATCH] Qt5 sometimes defines Metatypes by itself, don't define them twice --- src/libtomahawk/Playlist.h | 6 +++++- src/libtomahawk/database/DatabaseCommand_GenericSelect.h | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/Playlist.h b/src/libtomahawk/Playlist.h index 2630807dd..db523165c 100644 --- a/src/libtomahawk/Playlist.h +++ b/src/libtomahawk/Playlist.h @@ -287,6 +287,10 @@ private: } Q_DECLARE_METATYPE( QSharedPointer< Tomahawk::Playlist > ) -Q_DECLARE_METATYPE( QList< QSharedPointer< Tomahawk::Query > > ) + +#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 ) + // Qt5 automatically generated this Metatype + Q_DECLARE_METATYPE( QList< QSharedPointer< Tomahawk::Query > > ) +#endif #endif // PLAYLIST_H diff --git a/src/libtomahawk/database/DatabaseCommand_GenericSelect.h b/src/libtomahawk/database/DatabaseCommand_GenericSelect.h index 0595a05d7..d3a15af0d 100644 --- a/src/libtomahawk/database/DatabaseCommand_GenericSelect.h +++ b/src/libtomahawk/database/DatabaseCommand_GenericSelect.h @@ -87,6 +87,9 @@ private: } -Q_DECLARE_METATYPE(QList); +#if QT_VERSION < QT_VERSION_CHECK( 5, 0, 0 ) + // Qt5 automatically generated this Metatype + Q_DECLARE_METATYPE(QList) +#endif #endif // DATABASECOMMAND_GENERICSELECT_H