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