diff --git a/retroshare-gui/src/gui/Posted/PostedItem.h b/retroshare-gui/src/gui/Posted/PostedItem.h index 2f1bc51b1..a679efd0d 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.h +++ b/retroshare-gui/src/gui/Posted/PostedItem.h @@ -123,6 +123,13 @@ private: Ui::PostedItem *ui; }; +// Qt5 only (see GxsFeedItem.h/GxsGroupFeedItem.h): Qt6 auto-registers this +// complete type with the metatype system, and an explicit specialization here +// clashes with the implicit QMetaTypeId instantiation in CMake AUTOMOC's single +// mocs_compilation.cpp translation unit ("specialization after instantiation"). +// qmake compiles each moc separately. +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) Q_DECLARE_METATYPE(RsPostedPost) +#endif #endif diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index e39c4aeed..4dcaed2fb 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -77,8 +77,6 @@ static const int POSTED_TABS_POSTS = 1; #define IMAGE_AUTHOR ":/images/user/personal64.png" #define IMAGE_COPYHTTP ":/images/emblem-web.png" -Q_DECLARE_METATYPE(RsPostedPost); - // Delegate used to paint into the table of thumbnails //=================================================================================================================================== diff --git a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp index cb42c3c73..2461e61e1 100644 --- a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp @@ -36,7 +36,6 @@ //#define DEBUG_CHANNEL_MODEL Q_DECLARE_METATYPE(RsMsgMetaData) -Q_DECLARE_METATYPE(RsPostedPost) const uint32_t RsPostedPostsModel::DEFAULT_DISPLAYED_NB_POSTS = 10;