Fix Warnings for 'RsGxsChannels::createComment' and

'RsGxsChannels::createVote' hides overloaded virtual function

In file included from temp/moc/moc_GxsChannelGroupItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelGroupItem.h:24:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:116:15:
warning: 'RsGxsChannels::createComment' hides overloaded virtual
function [-Woverloaded-virtual]
        virtual bool createComment(RsGxsComment& comment) = 0;
                     ^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:172:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createComment'
declared here: different number of parameters (2 vs 1)
        virtual bool createComment(uint32_t &token, RsGxsComment
&comment) = 0;
                     ^
In file included from temp/moc/moc_GxsChannelGroupItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelGroupItem.h:24:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:132:15:
warning: 'RsGxsChannels::createVote' hides overloaded virtual function
[-Woverloaded-virtual]
        virtual bool createVote(RsGxsVote& vote) = 0;
                     ^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:173:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createVote'
declared here: different number of parameters (2 vs 1)
        virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
                     ^
In file included from temp/moc/moc_GxsChannelPostItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelPostItem.h:26:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:116:15:
warning: 'RsGxsChannels::createComment' hides overloaded virtual
function [-Woverloaded-virtual]
        virtual bool createComment(RsGxsComment& comment) = 0;
                     ^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:172:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createComment'
declared here: different number of parameters (2 vs 1)
        virtual bool createComment(uint32_t &token, RsGxsComment
&comment) = 0;
                     ^
In file included from temp/moc/moc_GxsChannelPostItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelPostItem.h:26:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:132:15:
warning: 'RsGxsChannels::createVote' hides overloaded virtual function
[-Woverloaded-virtual]
        virtual bool createVote(RsGxsVote& vote) = 0;
                     ^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:173:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createVote'
declared here: different number of parameters (2 vs 1)
        virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
                     ^
This commit is contained in:
Phenom 2019-02-14 21:58:33 +01:00
parent e7fa5556b0
commit 8806840989
8 changed files with 19 additions and 20 deletions

View file

@ -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;
}

View file

@ -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<RsGxsComment> &msgs)
virtual bool getCommentData(uint32_t token, std::vector<RsGxsComment> &msgs) override
{ return mCommentService->getGxsCommentData(token, msgs); }
virtual bool getRelatedComments( uint32_t token,
std::vector<RsGxsComment> &msgs )
std::vector<RsGxsComment> &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<RsGxsGroupId, RsGxsMessageId>& msgId)
virtual bool acknowledgeComment(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
{
return acknowledgeMsg(token, msgId);
}
virtual bool acknowledgeVote(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId)
virtual bool acknowledgeVote(uint32_t token, std::pair<RsGxsGroupId, RsGxsMessageId>& msgId) override
{
if (mCommentService->acknowledgeVote(token, msgId))
{

View file

@ -89,12 +89,12 @@ virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgI
std::vector<RsGxsComment> &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);
}