diff --git a/retroshare-gui/src/gui/Posted/PostedListDialog.cpp b/retroshare-gui/src/gui/Posted/PostedListDialog.cpp index 7f29ed0ae..b9a5cf441 100644 --- a/retroshare-gui/src/gui/Posted/PostedListDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListDialog.cpp @@ -128,7 +128,7 @@ void PostedListDialog::updateShowText() void PostedListDialog::getRankings() { - if(mCurrTopicId.empty()) + if(mCurrTopicId.isNull()) return; std::cerr << "PostedListDialog::getRankings()"; @@ -166,12 +166,12 @@ void PostedListDialog::getRankings() void PostedListDialog::groupListCustomPopupMenu(QPoint /*point*/) { - if (mCurrTopicId.empty()) + if (mCurrTopicId.isNull()) { return; } - uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId)); + uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId.toStdString())); QMenu contextMnu(this); @@ -191,10 +191,10 @@ void PostedListDialog::groupListCustomPopupMenu(QPoint /*point*/) void PostedListDialog::newPost() { - if(mCurrTopicId.empty()) + if(mCurrTopicId.isNull()) return; - uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId)); + uint32_t subscribeFlags = ui.groupTreeWidget->subscribeFlags(QString::fromStdString(mCurrTopicId.toStdString())); bool isSubscribed = IS_GROUP_SUBSCRIBED(subscribeFlags); if (isSubscribed) @@ -209,7 +209,7 @@ void PostedListDialog::unsubscribeTopic() std::cerr << "PostedListDialog::unsubscribeTopic()"; std::cerr << std::endl; - if(mCurrTopicId.empty()) + if(mCurrTopicId.isNull()) return; uint32_t token; @@ -222,7 +222,7 @@ void PostedListDialog::subscribeTopic() std::cerr << "PostedListDialog::subscribeTopic()"; std::cerr << std::endl; - if(mCurrTopicId.empty()) + if(mCurrTopicId.isNull()) return; uint32_t token; @@ -368,7 +368,7 @@ void PostedListDialog::newTopic() void PostedListDialog::showGroupDetails() { - if (mCurrTopicId.empty()) + if (mCurrTopicId.isNull()) { return; } @@ -393,7 +393,7 @@ void PostedListDialog::requestGroupSummary() mPostedQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_SUMMARY, opts, TOKEN_USER_TYPE_TOPIC); /* refresh Id Chooser Too */ - RsGxsId currentId = ""; + RsGxsId currentId ; ui.idChooser->getChosenId(currentId); ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, currentId); } @@ -403,7 +403,7 @@ void PostedListDialog::acknowledgeGroup(const uint32_t &token) RsGxsGroupId grpId; rsPosted->acknowledgeGrp(token, grpId); - if(!grpId.empty()) + if(!grpId.isNull()) { RsTokReqOptions opts; opts.mReqType = GXS_REQUEST_TYPE_GROUP_META; @@ -459,11 +459,11 @@ void PostedListDialog::loadVoteData(const uint32_t &/*token*/) /*********************** **** **** **** ***********************/ /*********************** **** **** **** ***********************/ -void PostedListDialog::requestGroupSummary_CurrentForum(const std::string &forumId) +void PostedListDialog::requestGroupSummary_CurrentForum(const RsGxsGroupId &forumId) { RsTokReqOptions opts; - std::list grpIds; + std::list grpIds; grpIds.push_back(forumId); std::cerr << "PostedListDialog::requestGroupSummary_CurrentForum(" << forumId << ")"; @@ -503,12 +503,12 @@ void PostedListDialog::insertThreads() loadCurrentTopicThreads(mCurrTopicId); } -void PostedListDialog::loadCurrentTopicThreads(const std::string &topicId) +void PostedListDialog::loadCurrentTopicThreads(const RsGxsGroupId &topicId) { std::cerr << "PostedListDialog::loadCurrentForumThreads(" << topicId << ")"; std::cerr << std::endl; - if (topicId.empty()) + if (topicId.isNull()) { std::cerr << "PostedListDialog::loadCurrentForumThreads() Empty GroupId .. ignoring Req"; std::cerr << std::endl; @@ -521,7 +521,7 @@ void PostedListDialog::loadCurrentTopicThreads(const std::string &topicId) requestGroupThreadData_InsertThreads(topicId); } -void PostedListDialog::requestGroupThreadData_InsertThreads(const std::string &groupId) +void PostedListDialog::requestGroupThreadData_InsertThreads(const RsGxsGroupId &groupId) { RsTokReqOptions opts; @@ -921,7 +921,7 @@ void PostedListDialog::loadRequest(const TokenQueue *queue, const TokenRequest & void PostedListDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo) { - groupItemInfo.id = QString::fromStdString(groupInfo.mGroupId); + groupItemInfo.id = QString::fromStdString(groupInfo.mGroupId.toStdString()); groupItemInfo.name = QString::fromUtf8(groupInfo.mGroupName.c_str()); //groupItemInfo.description = QString::fromUtf8(groupInfo.forumDesc); groupItemInfo.popularity = groupInfo.mPop; diff --git a/retroshare-gui/src/gui/Posted/PostedListDialog.h b/retroshare-gui/src/gui/Posted/PostedListDialog.h index a3f8ab9f2..4fe256601 100644 --- a/retroshare-gui/src/gui/Posted/PostedListDialog.h +++ b/retroshare-gui/src/gui/Posted/PostedListDialog.h @@ -101,7 +101,7 @@ private: void acknowledgeGroup(const uint32_t &token); void loadGroupSummary(const uint32_t &token); - void requestGroupSummary_CurrentForum(const std::string &forumId); + void requestGroupSummary_CurrentForum(const RsGxsGroupId &forumId); void loadGroupSummary_CurrentForum(const uint32_t &token); // subscribe/unsubscribe ack. @@ -111,8 +111,8 @@ private: void acknowledgePostMsg(const uint32_t &token); void loadPostData(const uint32_t &token); void insertThreads(); - void loadCurrentTopicThreads(const std::string &forumId); - void requestGroupThreadData_InsertThreads(const std::string &forumId); + void loadCurrentTopicThreads(const RsGxsGroupId &forumId); + void requestGroupThreadData_InsertThreads(const RsGxsGroupId &forumId); void loadGroupThreadData_InsertThreads(const uint32_t &token); // votes diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 6fc2291f0..f47f257b2 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -175,11 +175,11 @@ void GxsChannelPostItem::loadPost(const RsGxsChannelPost &post) { title = tr("Channel Feed") + ": "; RetroShareLink link; - link.createChannel(post.mMeta.mGroupId, ""); + link.createChannel(post.mMeta.mGroupId.toStdString(), ""); title += link.toHtml(); titleLabel->setText(title); RetroShareLink msgLink; - msgLink.createChannel(post.mMeta.mGroupId, post.mMeta.mMsgId); + msgLink.createChannel(post.mMeta.mGroupId.toStdString(), post.mMeta.mMsgId.toStdString()); subjectLabel->setText(msgLink.toHtml()); if (IS_GROUP_SUBSCRIBED(mSubscribeFlags) || IS_GROUP_ADMIN(mSubscribeFlags)) diff --git a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp index 0cab1ce06..edaa83529 100644 --- a/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp +++ b/retroshare-gui/src/gui/gxschannels/CreateGxsChannelMsg.cpp @@ -409,7 +409,7 @@ void CreateGxsChannelMsg::addAttachment(const std::string &path) rsGxsChannels->ExtraFileHash(path, filename); -#error: hash is used uninitialized below ?!? +#warning: hash is used uninitialized below ?!? // only path and filename are valid. // destroyed when fileFrame (this subfileitem) is destroyed