mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
fixed missing returns
This commit is contained in:
parent
2387150f64
commit
b8ec91aac5
@ -307,8 +307,18 @@ bool p3Posted::getBoardsInfo(
|
||||
uint32_t token;
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
if( !requestGroupInfo(token, opts, boardsIds)
|
||||
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||
|
||||
if(boardsIds.empty())
|
||||
{
|
||||
if( !requestGroupInfo(token, opts) || waitToken(token) != RsTokenService::COMPLETE )
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !requestGroupInfo(token, opts, boardsIds) || waitToken(token) != RsTokenService::COMPLETE )
|
||||
return false;
|
||||
}
|
||||
|
||||
return getGroupData(token, groupsInfo) && !groupsInfo.empty();
|
||||
}
|
||||
|
||||
|
@ -163,6 +163,8 @@ bool PostedDialog::getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo)
|
||||
|
||||
for (auto& group: groups)
|
||||
groupInfo.push_back(new RsPostedGroup(group));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
GxsGroupDialog *PostedDialog::createNewGroupDialog(TokenQueue *tokenQueue)
|
||||
|
@ -358,16 +358,6 @@ bool GxsChannelDialog::getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo
|
||||
for (auto& group: groups)
|
||||
groupInfo.push_back(new RsGxsChannelGroup(group));
|
||||
|
||||
// if (group.mImage.mData != NULL) {
|
||||
// QPixmap image;
|
||||
// GxsIdDetails::loadPixmapFromData(group.mImage.mData, group.mImage.mSize, image,GxsIdDetails::ORIGINAL);
|
||||
// channelData->mIcon[group.mMeta.mGroupId] = image;
|
||||
// }
|
||||
//
|
||||
// if (!group.mDescription.empty()) {
|
||||
// channelData->mDescription[group.mMeta.mGroupId] = QString::fromUtf8(group.mDescription.c_str());
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -46,14 +46,16 @@ protected:
|
||||
virtual RetroShareLink::enumType getLinkType() { return RetroShareLink::TYPE_CHANNEL; }
|
||||
virtual GroupFrameSettings::Type groupFrameSettingsType() { return GroupFrameSettings::Channel; }
|
||||
virtual QString getHelpString() const ;
|
||||
virtual void groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo);
|
||||
virtual bool getDistantSearchResults(TurtleRequestId id, std::map<RsGxsGroupId,RsGxsGroupSummary>& group_infos);
|
||||
virtual const std::set<TurtleRequestId> getSearchRequests() const override { return mSearchResults ; }
|
||||
|
||||
virtual TurtleRequestId distantSearch(const QString& search_string) ;
|
||||
virtual void checkRequestGroup(const RsGxsGroupId& grpId) ;
|
||||
|
||||
virtual UserNotify *createUserNotify(QObject *parent) override;
|
||||
const std::set<TurtleRequestId> getSearchRequests() const override { return mSearchResults ; }
|
||||
UserNotify *createUserNotify(QObject *parent) override;
|
||||
bool getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo) override;
|
||||
void groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo) override;
|
||||
|
||||
private slots:
|
||||
void toggleAutoDownload();
|
||||
void setDefaultDirectory();
|
||||
@ -74,8 +76,6 @@ private:
|
||||
virtual QWidget *createCommentHeaderWidget(const RsGxsGroupId &grpId, const RsGxsMessageId &msgId);
|
||||
virtual uint32_t requestGroupSummaryType() { return GXS_REQUEST_TYPE_GROUP_DATA; } // request complete group data
|
||||
|
||||
bool getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo) override;
|
||||
|
||||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
|
||||
std::set<TurtleRequestId> mSearchResults;
|
||||
|
@ -89,6 +89,8 @@ bool GxsForumsDialog::getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo)
|
||||
|
||||
for (auto& group: groups)
|
||||
groupInfo.push_back(new RsGxsForumGroup(group));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -199,6 +201,7 @@ GxsMessageFrameWidget *GxsForumsDialog::createMessageFrameWidget(const RsGxsGrou
|
||||
return new GxsForumThreadWidget(groupId);
|
||||
}
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
void GxsForumsDialog::loadGroupSummaryToken(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo, RsUserdata *&userdata)
|
||||
{
|
||||
std::vector<RsGxsForumGroup> groups;
|
||||
@ -218,6 +221,7 @@ void GxsForumsDialog::loadGroupSummaryToken(const uint32_t &token, std::list<RsG
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo)
|
||||
{
|
||||
|
@ -40,14 +40,13 @@ public:
|
||||
void shareInMessage(const RsGxsGroupId& forum_id, const QList<RetroShareLink>& file_link) ;
|
||||
|
||||
protected:
|
||||
virtual UserNotify *createUserNotify(QObject *parent) override;
|
||||
|
||||
virtual QString getHelpString() const ;
|
||||
virtual RetroShareLink::enumType getLinkType() { return RetroShareLink::TYPE_FORUM; }
|
||||
virtual GroupFrameSettings::Type groupFrameSettingsType() { return GroupFrameSettings::Forum; }
|
||||
|
||||
void groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo) override;
|
||||
UserNotify *createUserNotify(QObject *parent) override;
|
||||
bool getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo) override;
|
||||
void groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupData, GroupItemInfo &groupItemInfo) override;
|
||||
|
||||
private:
|
||||
/* GxsGroupFrameDialog */
|
||||
@ -59,7 +58,6 @@ private:
|
||||
virtual int shareKeyType();
|
||||
virtual GxsMessageFrameWidget *createMessageFrameWidget(const RsGxsGroupId &groupId);
|
||||
virtual uint32_t requestGroupSummaryType() { return GXS_REQUEST_TYPE_GROUP_DATA; } // request complete group data
|
||||
virtual void loadGroupSummaryToken(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo, RsUserdata* &userdata);
|
||||
|
||||
void handleEvent_main_thread(std::shared_ptr<const RsEvent> event);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user