diff --git a/libresapi/src/api/ChatHandler.h b/libresapi/src/api/ChatHandler.h index 57b227a0c..8294c8e22 100644 --- a/libresapi/src/api/ChatHandler.h +++ b/libresapi/src/api/ChatHandler.h @@ -29,7 +29,7 @@ #include "util/rstime.h" class RsPeers; -class RsIdentity; +struct RsIdentity; namespace resource_api { diff --git a/libresapi/src/api/IdentityHandler.h b/libresapi/src/api/IdentityHandler.h index 08bc5fbed..84b39878f 100644 --- a/libresapi/src/api/IdentityHandler.h +++ b/libresapi/src/api/IdentityHandler.h @@ -28,7 +28,7 @@ #include "ResourceRouter.h" #include "StateTokenServer.h" -class RsIdentity; +struct RsIdentity; namespace resource_api { diff --git a/libretroshare/src/retroshare/rsgxscommon.h b/libretroshare/src/retroshare/rsgxscommon.h index 77989d170..c8b8ec7a4 100644 --- a/libretroshare/src/retroshare/rsgxscommon.h +++ b/libretroshare/src/retroshare/rsgxscommon.h @@ -169,8 +169,8 @@ struct RsGxsCommentService virtual bool getRelatedComments( uint32_t token, std::vector &comments ) = 0; - virtual bool createComment(uint32_t &token, RsGxsComment &comment) = 0; - virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0; + virtual bool createNewComment(uint32_t &token, RsGxsComment &comment) = 0; + virtual bool createNewVote(uint32_t &token, RsGxsVote &vote) = 0; virtual bool acknowledgeComment( uint32_t token, diff --git a/libretroshare/src/retroshare/rsposted.h b/libretroshare/src/retroshare/rsposted.h index 60b510d55..55fc1639a 100644 --- a/libretroshare/src/retroshare/rsposted.h +++ b/libretroshare/src/retroshare/rsposted.h @@ -87,8 +87,8 @@ virtual bool getPostData(const uint32_t &token, std::vector &posts /* From RsGxsCommentService */ //virtual bool getCommentData(const uint32_t &token, std::vector &comments) = 0; //virtual bool getRelatedComments(const uint32_t &token, std::vector &comments) = 0; -//virtual bool createComment(uint32_t &token, RsGxsComment &comment) = 0; -//virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0; +//virtual bool createNewComment(uint32_t &token, RsGxsComment &comment) = 0; +//virtual bool createNewVote(uint32_t &token, RsGxsVote &vote) = 0; ////////////////////////////////////////////////////////////////////////////// virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0; diff --git a/libretroshare/src/serialiser/rsserializable.h b/libretroshare/src/serialiser/rsserializable.h index 147cce20e..5e115e673 100644 --- a/libretroshare/src/serialiser/rsserializable.h +++ b/libretroshare/src/serialiser/rsserializable.h @@ -37,6 +37,8 @@ struct RsSerializable */ virtual void serial_process(RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx) = 0; + + virtual ~RsSerializable() = default; }; /** @def RS_SERIAL_PROCESS(I) diff --git a/libretroshare/src/services/p3gxschannels.cc b/libretroshare/src/services/p3gxschannels.cc index 4289435b0..3f34b6438 100644 --- a/libretroshare/src/services/p3gxschannels.cc +++ b/libretroshare/src/services/p3gxschannels.cc @@ -1089,7 +1089,7 @@ bool p3GxsChannels::createChannel(RsGxsChannelGroup& channel) bool p3GxsChannels::createComment(RsGxsComment& comment) { uint32_t token; - if(!createComment(token, comment)) + if(!createNewComment(token, comment)) { std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating comment." << std::endl; @@ -1116,7 +1116,7 @@ bool p3GxsChannels::createComment(RsGxsComment& comment) bool p3GxsChannels::createVote(RsGxsVote& vote) { uint32_t token; - if(!createVote(token, vote)) + if(!createNewVote(token, vote)) { std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating vote." << std::endl; @@ -1795,7 +1795,7 @@ bool p3GxsChannels::generateComment(uint32_t &token, const RsGxsGroupId &grpId, } #endif - createComment(token, msg); + createNewComment(token, msg); return true; } @@ -1846,7 +1846,7 @@ bool p3GxsChannels::generateVote(uint32_t &token, const RsGxsGroupId &grpId, con vote.mVoteType = GXS_VOTE_DOWN; } - createVote(token, vote); + createNewVote(token, vote); return true; } diff --git a/libretroshare/src/services/p3gxschannels.h b/libretroshare/src/services/p3gxschannels.h index 27ab034f0..7ac63f8e7 100644 --- a/libretroshare/src/services/p3gxschannels.h +++ b/libretroshare/src/services/p3gxschannels.h @@ -132,30 +132,29 @@ virtual bool getChannelDownloadDirectory(const RsGxsGroupId &groupId, std::strin const RsGxsGroupId& grpId ) override; /* Comment service - Provide RsGxsCommentService - redirect to p3GxsCommentService */ - virtual bool getCommentData(uint32_t token, std::vector &msgs) + virtual bool getCommentData(uint32_t token, std::vector &msgs) override { return mCommentService->getGxsCommentData(token, msgs); } virtual bool getRelatedComments( uint32_t token, - std::vector &msgs ) + std::vector &msgs ) override { return mCommentService->getGxsRelatedComments(token, msgs); } -virtual bool createComment(uint32_t &token, RsGxsComment &msg) + virtual bool createNewComment(uint32_t &token, RsGxsComment &msg) override { return mCommentService->createGxsComment(token, msg); } -virtual bool createVote(uint32_t &token, RsGxsVote &msg) + virtual bool createNewVote(uint32_t &token, RsGxsVote &msg) override { return mCommentService->createGxsVote(token, msg); } -virtual bool acknowledgeComment(uint32_t token, std::pair& msgId) + virtual bool acknowledgeComment(uint32_t token, std::pair& msgId) override { return acknowledgeMsg(token, msgId); } - -virtual bool acknowledgeVote(uint32_t token, std::pair& msgId) + virtual bool acknowledgeVote(uint32_t token, std::pair& msgId) override { if (mCommentService->acknowledgeVote(token, msgId)) { diff --git a/libretroshare/src/services/p3photoservice.cc b/libretroshare/src/services/p3photoservice.cc index 71a920345..608fddbc0 100644 --- a/libretroshare/src/services/p3photoservice.cc +++ b/libretroshare/src/services/p3photoservice.cc @@ -187,8 +187,7 @@ void p3PhotoService::groupsChanged(std::list& grpIds) } -void p3PhotoService::msgsChanged( - std::map >& msgs) +void p3PhotoService::msgsChanged(GxsMsgIdResult& msgs) { RsStackMutex stack(mPhotoMutex); diff --git a/libretroshare/src/services/p3photoservice.h b/libretroshare/src/services/p3photoservice.h index 3d26ea739..d5a5ba661 100644 --- a/libretroshare/src/services/p3photoservice.h +++ b/libretroshare/src/services/p3photoservice.h @@ -56,8 +56,7 @@ public: void groupsChanged(std::list& grpIds); - void msgsChanged(std::map >& msgs); + void msgsChanged(GxsMsgIdResult& msgs); RsTokenService* getTokenService(); diff --git a/libretroshare/src/services/p3posted.h b/libretroshare/src/services/p3posted.h index 4a032b49b..402f69298 100644 --- a/libretroshare/src/services/p3posted.h +++ b/libretroshare/src/services/p3posted.h @@ -89,12 +89,12 @@ virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgI std::vector &msgs ) { return mCommentService->getGxsRelatedComments(token, msgs); } -virtual bool createComment(uint32_t &token, RsGxsComment &msg) + virtual bool createNewComment(uint32_t &token, RsGxsComment &msg) { return mCommentService->createGxsComment(token, msg); } -virtual bool createVote(uint32_t &token, RsGxsVote &msg) + virtual bool createNewVote(uint32_t &token, RsGxsVote &msg) { return mCommentService->createGxsVote(token, msg); } diff --git a/plugins/FeedReader/services/p3FeedReader.h b/plugins/FeedReader/services/p3FeedReader.h index 2c727c723..8d8446251 100644 --- a/plugins/FeedReader/services/p3FeedReader.h +++ b/plugins/FeedReader/services/p3FeedReader.h @@ -32,7 +32,7 @@ class RsFeedReaderMsg; class p3FeedReaderThread; class RsGxsForums; -class RsGxsForumGroup; +struct RsGxsForumGroup; class p3FeedReader : public RsPQIService, public RsFeedReader { diff --git a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h index 392fe35cc..1649aeece 100644 --- a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h +++ b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h @@ -25,7 +25,7 @@ #include "ui_DetailsDialog.h" #include -class FileChunksInfo ; +struct FileChunksInfo ; class DetailsDialog : public QDialog { diff --git a/retroshare-gui/src/gui/FileTransfer/FileTransferInfoWidget.h b/retroshare-gui/src/gui/FileTransfer/FileTransferInfoWidget.h index 04e7a9856..a82f08dbc 100644 --- a/retroshare-gui/src/gui/FileTransfer/FileTransferInfoWidget.h +++ b/retroshare-gui/src/gui/FileTransfer/FileTransferInfoWidget.h @@ -27,8 +27,8 @@ #include "RsAutoUpdatePage.h" #include -class FileChunksInfo ; -class FileInfo ; +struct FileChunksInfo ; +struct FileInfo ; class FileTransferInfoWidget : public RsAutoUpdatePage { diff --git a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp index e51bc51b8..f6d230683 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidget.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListWidget.cpp @@ -262,7 +262,7 @@ void PostedListWidget::submitVote(const RsGxsGrpMsgIdPair &msgId, bool up) std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl; uint32_t token; - rsPosted->createVote(token, vote); + rsPosted->createNewVote(token, vote); mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, mTokenTypeVote); } diff --git a/retroshare-gui/src/gui/RemoteDirModel.h b/retroshare-gui/src/gui/RemoteDirModel.h index e2a6246cc..7184ae8d2 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.h +++ b/retroshare-gui/src/gui/RemoteDirModel.h @@ -40,7 +40,7 @@ #define COLUMN_COUNT 6 #define RETROSHARE_DIR_MODEL_FILTER_STRING "filtered" -class DirDetails; +struct DirDetails; class DirDetailsVector : public DirDetails { diff --git a/retroshare-gui/src/gui/common/GroupDefs.h b/retroshare-gui/src/gui/common/GroupDefs.h index 2f222847e..c52a73283 100644 --- a/retroshare-gui/src/gui/common/GroupDefs.h +++ b/retroshare-gui/src/gui/common/GroupDefs.h @@ -21,7 +21,7 @@ #ifndef _GROUPDEFS_H #define _GROUPDEFS_H -class RsGroupInfo; +struct RsGroupInfo; class GroupDefs { diff --git a/retroshare-gui/src/gui/common/PeerDefs.h b/retroshare-gui/src/gui/common/PeerDefs.h index e6b05505b..9e4e6fadc 100644 --- a/retroshare-gui/src/gui/common/PeerDefs.h +++ b/retroshare-gui/src/gui/common/PeerDefs.h @@ -24,7 +24,7 @@ #include #include -class RsPeerDetails; +struct RsPeerDetails; class PeerDefs { diff --git a/retroshare-gui/src/gui/common/StatusDefs.h b/retroshare-gui/src/gui/common/StatusDefs.h index bbe3bc568..d06cbb1d9 100644 --- a/retroshare-gui/src/gui/common/StatusDefs.h +++ b/retroshare-gui/src/gui/common/StatusDefs.h @@ -24,7 +24,7 @@ #include #include -class RsPeerDetails; +struct RsPeerDetails; class StatusDefs { diff --git a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp index e5d714860..dc1734556 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp @@ -271,7 +271,7 @@ void GxsCommentTreeWidget::vote(const RsGxsGroupId &groupId, const RsGxsMessageI std::cerr << "AuthorId : " << vote.mMeta.mAuthorId << std::endl; uint32_t token; - mCommentService->createVote(token, vote); + mCommentService->createNewVote(token, vote); mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, COMMENT_VOTE_ACK); } diff --git a/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp b/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp index 0181845c1..5158d8981 100644 --- a/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCreateCommentDialog.cpp @@ -105,7 +105,7 @@ void GxsCreateCommentDialog::createComment() }//switch (ui->idChooser->getChosenId(authorId)) uint32_t token; - mCommentService->createComment(token, comment); + mCommentService->createNewComment(token, comment); mTokenQueue->queueRequest(token, TOKENREQ_MSGINFO, RS_TOKREQ_ANSTYPE_ACK, 0); close(); } diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h index 9fb1f38cc..4e77ccb44 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h +++ b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h @@ -41,7 +41,7 @@ class GroupTreeWidget; class GroupItemInfo; class GxsMessageFrameWidget; class UIStateHelper; -class RsGxsCommentService; +struct RsGxsCommentService; class GxsCommentDialog; class GxsGroupFrameDialog : public RsGxsUpdateBroadcastPage, public TokenResponse diff --git a/retroshare-gui/src/gui/gxs/GxsIdChooser.h b/retroshare-gui/src/gui/gxs/GxsIdChooser.h index 2677a8233..dbd9fb91f 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdChooser.h +++ b/retroshare-gui/src/gui/gxs/GxsIdChooser.h @@ -28,7 +28,7 @@ // should update regularly. They also should update only when visible, to save CPU time. // -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class RsGxsUpdateBroadcastBase; #define IDCHOOSER_ID_REQUIRED 0x0001 diff --git a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h index b99ad23d5..41b98dc6b 100644 --- a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h +++ b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h @@ -24,7 +24,7 @@ #include "gui/gxs/RsGxsUpdateBroadcastWidget.h" #include "util/TokenQueue.h" -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class UIStateHelper; class GxsMessageFrameWidget : public RsGxsUpdateBroadcastWidget, public TokenResponse diff --git a/retroshare-gui/src/gui/gxs/GxsUserNotify.h b/retroshare-gui/src/gui/gxs/GxsUserNotify.h index 174017803..c4dca9995 100644 --- a/retroshare-gui/src/gui/gxs/GxsUserNotify.h +++ b/retroshare-gui/src/gui/gxs/GxsUserNotify.h @@ -25,7 +25,7 @@ #include "gui/common/UserNotify.h" #include "util/TokenQueue.h" -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class RsGxsUpdateBroadcastBase; class GxsUserNotify : public UserNotify, public TokenResponse diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h index afc62d686..ef19a1967 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h @@ -24,7 +24,7 @@ #include class QShowEvent; -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class RsGxsUpdateBroadcast; typedef uint32_t TurtleRequestId ; diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h index 9efc5a8db..3a37c06cd 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h @@ -31,7 +31,7 @@ // widget. // -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class RsGxsUpdateBroadcastBase; typedef uint32_t TurtleRequestId ; diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h index bb72a8205..d1404b656 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h @@ -31,7 +31,7 @@ // widget. // -class RsGxsIfaceHelper; +struct RsGxsIfaceHelper; class RsGxsUpdateBroadcastBase; typedef uint32_t TurtleRequestId; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelFilesWidget.h b/retroshare-gui/src/gui/gxschannels/GxsChannelFilesWidget.h index 044661b7d..cb8bd8d14 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelFilesWidget.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelFilesWidget.h @@ -25,7 +25,7 @@ #include "retroshare/rsgxsifacetypes.h" -class RsGxsChannelPost; +struct RsGxsChannelPost; class RSTreeWidgetItemCompareRole; class QTreeWidgetItem; class GxsFeedItem; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h index 705d080a3..83fb0ea37 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.h @@ -30,13 +30,12 @@ class QSortFilterProxyModel; class QTreeWidgetItem; class RSTreeWidgetItemCompareRole; -class RsGxsForumMsg; class GxsForumsFillThread; class QItemSelection; -class RsGxsForumGroup; +struct RsGxsForumGroup; class RsGxsForumModel; -class RsGxsForumMsg; -class ForumModelPostEntry; +struct RsGxsForumMsg; +struct ForumModelPostEntry; namespace Ui { class GxsForumThreadWidget; diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.h b/retroshare-gui/src/gui/msgs/MessageComposer.h index 2666da86d..1b0b2f2c5 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.h +++ b/retroshare-gui/src/gui/msgs/MessageComposer.h @@ -30,14 +30,14 @@ #include "gui/msgs/MessageInterface.h" class QAction; -class RsIdentityDetails; +struct RsIdentityDetails; class QComboBox; class QFontComboBox; class QTextEdit; class QTextCharFormat; class RSTreeWidgetItemCompareRole; -class RsGxsChannelGroup; -class RsGxsForumGroup; +struct RsGxsChannelGroup; +struct RsGxsForumGroup; class MessageComposer : public QMainWindow { diff --git a/retroshare-gui/src/util/RsGxsUpdateBroadcast.h b/retroshare-gui/src/util/RsGxsUpdateBroadcast.h index adc554203..1a776f2c4 100644 --- a/retroshare-gui/src/util/RsGxsUpdateBroadcast.h +++ b/retroshare-gui/src/util/RsGxsUpdateBroadcast.h @@ -25,8 +25,8 @@ #include -class RsGxsIfaceHelper; -class RsGxsChanges; +struct RsGxsIfaceHelper; +struct RsGxsChanges; typedef uint32_t TurtleRequestId ; diff --git a/retroshare.pri b/retroshare.pri index be9951915..24059540a 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -434,6 +434,8 @@ no_rs_deprecatedwarning { no_rs_cppwarning { QMAKE_CXXFLAGS += -Wno-cpp + QMAKE_CXXFLAGS += -Wno-inconsistent-missing-override + DEFINES *= RS_NO_WARN_CPP message("QMAKE: You have disabled C preprocessor warnings.") }