From d0c008c375905fe7cd8313dc76dbab7601a4ce4b Mon Sep 17 00:00:00 2001 From: jolavillette Date: Wed, 17 Jun 2026 08:52:43 +0200 Subject: [PATCH] Fix missing Q_DECLARE_METATYPE include in Posted board widgets Commit 724db9ae6 ("Fix duplicated MOC declaration") consolidated Q_DECLARE_METATYPE(RsPostedPost) into PostedItem.h and removed the in-file declarations that PostedListWidgetWithModel.cpp and PostedPostsModel.cpp previously carried. But both translation units use QVariant with RsPostedPost (value<>() / fromValue()) and neither includes PostedItem.h, directly or transitively, so the build broke with: error: static assertion failed: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system Add the missing #include "PostedItem.h" to both files so the metatype declaration is visible in those TUs. Co-Authored-By: Claude Opus 4.8 (1M context) --- retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp | 1 + retroshare-gui/src/gui/Posted/PostedPostsModel.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp index 4dcaed2fb..c5ed31892 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.cpp @@ -53,6 +53,7 @@ #include "PostedListWidgetWithModel.h" #include "PostedPostsModel.h" #include "BoardPostDisplayWidget.h" +#include "PostedItem.h" // for Q_DECLARE_METATYPE(RsPostedPost) #include diff --git a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp index 2461e61e1..6809379d3 100644 --- a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp @@ -32,6 +32,7 @@ #include "util/DateTime.h" #include "PostedPostsModel.h" +#include "PostedItem.h" // for Q_DECLARE_METATYPE(RsPostedPost) //#define DEBUG_CHANNEL_MODEL