- removed LinksCloud from plugins (based on obsolete cache system)

- removed copy constructor of RsGenericId from std::string as it allowed many inconsistencies and double transforms of IDs from/to strings


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7289 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-04-20 16:34:26 +00:00
parent 160e04fe9a
commit 33abca82e5
33 changed files with 97 additions and 143 deletions

View File

@ -882,7 +882,7 @@ bool CacheStrapper::saveList(bool &cleanup, std::list<RsItem *>& saveData)
// Fixup lazy behaviour in clients...
// This ensures correct loading later.
// (used to be: rscc->pid = cit->pid;)
rscc->pid = ownId.toStdString();
rscc->pid = ownId;
//rscc->pname = cit->pname;
rscc->cachetypeid = cit->cid.type;
@ -909,7 +909,7 @@ bool CacheStrapper::saveList(bool &cleanup, std::list<RsItem *>& saveData)
RsCacheConfig *rscc = new RsCacheConfig();
rscc->pid = cit->pid.toStdString();
rscc->pid = cit->pid;
//rscc->pname = cit->pname;
rscc->cachetypeid = cit->cid.type;
rscc->cachesubid = cit->cid.subid;

View File

@ -199,7 +199,7 @@ HashCache::HashCache(const std::string& path)
f->getline(buff,max_line_size,'\n') ; if(sscanf(buff,RsDirUtil::scanf_string_for_uint(sizeof(info.time_stamp)),&info.time_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; }
f->getline(buff,max_line_size,'\n') ; if(sscanf(buff,RsDirUtil::scanf_string_for_uint(sizeof(info.modf_stamp)),&info.modf_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; }
f->getline(buff,max_line_size,'\n') ; info.hash = std::string(buff) ;
f->getline(buff,max_line_size,'\n') ; info.hash = RsFileHash(std::string(buff)) ;
#ifdef FIM_DEBUG
std::cerr << " (" << name << ", " << info.size << ", " << info.time_stamp << ", " << info.modf_stamp << ", " << info.hash << std::endl ;

View File

@ -941,7 +941,7 @@ int FileIndex::loadIndex(const std::string& filename, const RsFileHash& expected
nfile = new FileEntry();
registerEntry((void*)nfile) ;
nfile->name = tokens[0];
nfile->hash = tokens[1];
nfile->hash = RsFileHash(tokens[1]);
nfile->size = atoll(tokens[2].c_str());
nfile->modtime = atoi(tokens[3].c_str());
nfile->pop = atoi(tokens[4].c_str());
@ -1051,7 +1051,7 @@ int FileIndex::saveIndex(const std::string& filename, RsFileHash &fileHash, uint
return false ;
}
fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size).toStdString() ;
fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size);
std::cerr << " file = " << filename << std::endl;
std::cerr << " old size = " << s.length() << std::endl;

View File

@ -280,19 +280,19 @@ RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
// grpId
std::string tempId;
c.getString(COL_GRP_ID, tempId);
grpMeta->mGroupId = tempId;
grpMeta->mGroupId = RsGxsGroupId(tempId);
c.getString(COL_IDENTITY, tempId);
grpMeta->mAuthorId = tempId;
grpMeta->mAuthorId = RsGxsId(tempId);
c.getString(COL_GRP_NAME, grpMeta->mGroupName);
c.getString(COL_ORIG_GRP_ID, tempId);
grpMeta->mOrigGrpId = tempId;
grpMeta->mOrigGrpId = RsGxsGroupId(tempId);
c.getString(COL_GRP_SERV_STRING, grpMeta->mServiceString);
std::string temp;
c.getString(COL_HASH, temp);
grpMeta->mHash = temp;
grpMeta->mHash = RsFileHash(temp);
grpMeta->mReputationCutOff = c.getInt32(COL_GRP_REP_CUTOFF);
grpMeta->mSignFlags = c.getInt32(COL_GRP_SIGN_FLAGS);
@ -318,10 +318,10 @@ RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
grpMeta->mGroupStatus = c.getInt32(COL_GRP_STATUS);
c.getString(COL_GRP_CIRCLE_ID, tempId);
grpMeta->mCircleId = tempId;
grpMeta->mCircleId = RsGxsCircleId(tempId);
grpMeta->mCircleType = c.getInt32(COL_GRP_CIRCL_TYPE);
c.getString(COL_GRP_INTERN_CIRCLE, tempId);
grpMeta->mInternalCircle = tempId;
grpMeta->mInternalCircle = RsGxsCircleId(tempId);
std::string s ; c.getString(COL_GRP_ORIGINATOR, s) ;
grpMeta->mOriginator = RsPeerId(s);
@ -330,7 +330,7 @@ RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
c.getString(COL_PARENT_GRP_ID, tempId);
grpMeta->mParentGrpId = tempId;
grpMeta->mParentGrpId = RsGxsGroupId(tempId);
if(ok)
return grpMeta;
@ -410,19 +410,19 @@ RsGxsMsgMetaData* RsDataService::locked_getMsgMeta(RetroCursor &c)
msgMeta->mGroupId = RsGxsGroupId(gId);
std::string temp;
c.getString(COL_MSG_ID, temp);
msgMeta->mMsgId = temp;
msgMeta->mMsgId = RsGxsMessageId(temp);
// without these, a msg is meaningless
ok &= (!msgMeta->mGroupId.isNull()) && (!msgMeta->mMsgId.isNull());
c.getString(COL_ORIG_MSG_ID, temp);
msgMeta->mOrigMsgId = temp;
msgMeta->mOrigMsgId = RsGxsMessageId(temp);
c.getString(COL_IDENTITY, temp);
msgMeta->mAuthorId = temp;
msgMeta->mAuthorId = RsGxsId(temp);
c.getString(COL_MSG_NAME, msgMeta->mMsgName);
c.getString(COL_MSG_SERV_STRING, msgMeta->mServiceString);
c.getString(COL_HASH, temp);
msgMeta->mHash = temp;
msgMeta->mHash = RsFileHash(temp);
msgMeta->recvTS = c.getInt32(COL_MSG_RECV_TS);
offset = 0;
@ -437,9 +437,9 @@ RsGxsMsgMetaData* RsDataService::locked_getMsgMeta(RetroCursor &c)
// thread and parent id
c.getString(COL_THREAD_ID, temp);
msgMeta->mThreadId = temp;
msgMeta->mThreadId = RsGxsMessageId(temp);
c.getString(COL_PARENT_ID, temp);
msgMeta->mParentId = temp;
msgMeta->mParentId = RsGxsMessageId(temp);
// local meta
msgMeta->mMsgStatus = c.getInt32(COL_MSG_STATUS);
@ -467,7 +467,7 @@ RsNxsMsg* RsDataService::locked_getMessage(RetroCursor &c)
c.getStringT<RsGxsGroupId>(COL_ACT_GROUP_ID, msg->grpId);
std::string temp;
c.getString(COL_ACT_MSG_ID, temp);
msg->msgId = temp;
msg->msgId = RsGxsMessageId(temp);
ok &= (!msg->grpId.isNull()) && (!msg->msgId.isNull());
@ -1437,7 +1437,7 @@ void RsDataService::locked_getMessageOffsets(const RsGxsGroupId& grpId, std::vec
int32_t msgOffSet;
std::string temp;
c->getString(0, temp);
msgId = temp;
msgId = RsGxsMessageId(temp);
msgOffSet = c->getInt32(1);
msgLen = c->getInt32(2);

View File

@ -231,7 +231,7 @@ bool RsPluginManager::loadPlugin(RsPlugin *p)
PluginInfo pinfo ;
pinfo.plugin = p ;
pinfo.file_name = "No file" ;
pinfo.file_hash = "No hash" ;
pinfo.file_hash.clear() ;
pinfo.info_string = "" ;
p->setPlugInHandler(this); // WIN fix, cannot share global space with shared libraries
@ -456,7 +456,7 @@ bool RsPluginManager::loadList(std::list<RsItem*>& list)
}
else if((*kit).key == "REFERENCE_EXECUTABLE_HASH")
{
reference_executable_hash = kit->value ;
reference_executable_hash = RsFileHash(kit->value) ;
std::cerr << " Reference executable hash: " << kit->value << std::endl;
}
else if((*kit).key == "ACCEPTED")

View File

@ -162,7 +162,7 @@ bool p3ServiceControl::getOwnServices(RsPeerServiceInfo &info)
RsStackMutex stack(mCtrlMtx); /***** LOCK STACK MUTEX ****/
info.mPeerId = "";
info.mPeerId.clear() ;
info.mServiceList = mOwnServices;
return true;
}

View File

@ -83,14 +83,6 @@ template<uint32_t ID_SIZE_IN_BYTES,bool UPPER_CASE,uint32_t UNIQUE_IDENTIFIER> c
return id ;
}
inline void operator=(const std::string& str)
{
t_RsGenericIdType<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER> temp = t_RsGenericIdType<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER>(str);
for(uint32_t i = 0; i < ID_SIZE_IN_BYTES; i++)
this->bytes[i] = temp.toByteArray()[i];
}
inline void clear() { memset(bytes,0,SIZE_IN_BYTES) ; }
// Converts to a std::string using cached value.

View File

@ -393,7 +393,7 @@ bool RsGxsChannelPostItem::toChannelPost(RsGxsChannelPost &post, bool moveImage)
RsGxsFile fi;
fi.mName = RsDirUtil::getTopDir(fit->name);
fi.mSize = fit->filesize;
fi.mHash = fit->hash.toStdString();
fi.mHash = fit->hash;
post.mFiles.push_back(fi);
post.mCount++;

View File

@ -1122,8 +1122,8 @@ bool p3GxsChannels::generatePost(uint32_t &token, const RsGxsGroupId &grpId)
msg.mMeta.mMsgName = msg.mMsg;
msg.mMeta.mGroupId = grpId;
msg.mMeta.mThreadId = "";
msg.mMeta.mParentId = "";
msg.mMeta.mThreadId.clear() ;
msg.mMeta.mParentId.clear() ;
msg.mMeta.mMsgStatus = GXS_SERV::GXS_MSG_STATUS_UNPROCESSED | GXS_SERV::GXS_MSG_STATUS_UNREAD;

View File

@ -440,7 +440,7 @@ RsGenExchange::ServiceCreate_Return p3GxsCircles::service_CreateGroup(RsGxsGrpIt
if (item->meta.mCircleType == GXS_CIRCLE_TYPE_EXT_SELF)
{
item->meta.mCircleType = GXS_CIRCLE_TYPE_EXTERNAL;
item->meta.mCircleId = item->meta.mGroupId.toStdString();
item->meta.mCircleId = RsGxsCircleId(item->meta.mGroupId);
}
@ -484,7 +484,7 @@ RsGxsCircleCache::RsGxsCircleCache()
bool RsGxsCircleCache::loadBaseCircle(const RsGxsCircleGroup &circle)
{
mCircleId = circle.mMeta.mGroupId.toStdString();
mCircleId = RsGxsCircleId(circle.mMeta.mGroupId);
mCircleName = circle.mMeta.mGroupName;
mUpdateTime = time(NULL);
mProcessedCircles.insert(mCircleId);

View File

@ -1138,7 +1138,7 @@ RsGxsIdCache::RsGxsIdCache(const RsGxsIdGroupItem *item, const RsTlvSecurityKey
// Fill in Details.
details.mNickname = item->meta.mGroupName;
details.mId = item->meta.mGroupId.toStdString();
details.mId = RsGxsId(item->meta.mGroupId);
#ifdef DEBUG_IDS
std::cerr << "RsGxsIdCache::RsGxsIdCache() for: " << details.mId;
@ -2018,7 +2018,7 @@ RsGenExchange::ServiceCreate_Return p3IdService::service_CreateGroup(RsGxsGrpIte
if(pk.keyFlags == (RSTLV_KEY_DISTRIB_ADMIN | RSTLV_KEY_TYPE_FULL))
{
item->group.mMeta.mGroupId = pk.keyId;
item->group.mMeta.mGroupId = RsGxsGroupId(pk.keyId);
break;
}
}
@ -2150,8 +2150,8 @@ RsGenExchange::ServiceCreate_Return p3IdService::service_CreateGroup(RsGxsGrpIte
}
// Enforce no AuthorId.
item->meta.mAuthorId = "";
item->group.mMeta.mAuthorId = "";
item->meta.mAuthorId.clear() ;
item->group.mMeta.mAuthorId.clear() ;
// copy meta data to be sure its all the same.
//item->group.mMeta = item->meta;
@ -2899,26 +2899,6 @@ void p3IdService::loadRecognKeys()
/************************************************************************************/
/************************************************************************************/
std::string p3IdService::genRandomId(int len)
{
std::string randomId;
for(int i = 0; i < len; i++)
{
int val = RSRandom::random_u32() % 16;
if (val < 10)
{
randomId += (char) ('0' + val);
}
else
{
randomId += (char) ('a' + (val - 10));
}
}
return randomId;
}
#define MAX_KNOWN_PGPIDS 20
#define MAX_UNKNOWN_PGPIDS 20
#define MAX_PSEUDOIDS 20
@ -3008,7 +2988,7 @@ void p3IdService::generateDummy_FriendPGP()
for(int j = 0; j < idx; j++, it++) ;
// HACK FOR DUMMY GENERATION.
id.mMeta.mAuthorId = it->toStdString();
id.mMeta.mAuthorId = RsGxsId::random() ;
RsPeerDetails details;
if (/*rsPeers->getPeerDetails(*it, details)*/false)
@ -3021,7 +3001,7 @@ void p3IdService::generateDummy_FriendPGP()
{
std::cerr << "p3IdService::generateDummy_FriendPGP() missing" << std::endl;
std::cerr << std::endl;
id.mMeta.mGroupName = genRandomId();
id.mMeta.mGroupName = RSRandom::random_alphaNumericString(10) ;
}
uint32_t dummyToken = 0;
@ -3037,9 +3017,9 @@ void p3IdService::generateDummy_UnknownPGP()
// FAKE DATA.
id.mMeta.mGroupFlags = RSGXSID_GROUPFLAG_REALID;
id.mPgpIdHash = genRandomId(40);
id.mPgpIdSign = genRandomId(40);
id.mMeta.mGroupName = genRandomId();
id.mPgpIdHash = Sha1CheckSum::random() ;
id.mPgpIdSign = RSRandom::random_alphaNumericString(20) ;
id.mMeta.mGroupName = RSRandom::random_alphaNumericString(10) ;
uint32_t dummyToken = 0;
createGroup(dummyToken, id);
@ -3054,7 +3034,7 @@ void p3IdService::generateDummy_UnknownPseudo()
// FAKE DATA.
id.mMeta.mGroupFlags = 0;
id.mMeta.mGroupName = genRandomId();
id.mMeta.mGroupName = RSRandom::random_alphaNumericString(10) ;
uint32_t dummyToken = 0;
createGroup(dummyToken, id);

View File

@ -359,17 +359,6 @@ std::ostream &operator<<(std::ostream &out, const RsWikiComment &comment)
/***** FOR TESTING *****/
std::string p3Wiki::genRandomId()
{
std::string randomId;
for(int i = 0; i < 20; i++)
{
randomId += (char) ('a' + (RSRandom::random_u32() % 26));
}
return randomId;
}
const int about_len = 10;
const std::string about_txt[] =
{ "Welcome to RsWiki, a fully distributed Wiki system that anyone can edit.",
@ -454,9 +443,9 @@ void p3Wiki::generateDummyData()
for(i = 0; i < GEN_COLLECTIONS; i++)
{
RsWikiCollection wiki;
wiki.mMeta.mGroupId = genRandomId();
wiki.mMeta.mGroupId = RsGxsGroupId::random();
wiki.mMeta.mGroupFlags = 0;
wiki.mMeta.mGroupName = genRandomId();
wiki.mMeta.mGroupName = RsGxsGroupId::random().toStdString();
uint32_t dummyToken = 0;
submitCollection(dummyToken, wiki);
@ -523,7 +512,7 @@ bool generateNextDummyPage(const RsGxsMessageId &threadId, const int lines, cons
#include <retroshare/rsidentity.h>
std::string chooseRandomAuthorId()
RsGxsId chooseRandomAuthorId()
{
/* chose a random Id to sign with */
std::list<RsGxsId> ownIds;
@ -531,16 +520,11 @@ std::string chooseRandomAuthorId()
rsIdentity->getOwnIds(ownIds);
uint32_t idx = (uint32_t) (ownIds.size() * RSRandom::random_f32());
uint32_t idx = (uint32_t) (RSRandom::random_u32() % (int)ownIds.size()) ;
int i = 0;
for(it = ownIds.begin(); (it != ownIds.end()) && (i < idx); it++, i++) ;
RsGxsId answer;
if (it != ownIds.end())
{
answer = *it;
}
return answer.toStdString();
return *it ;
}

View File

@ -298,7 +298,7 @@ public:
inline void getStringT(int columnIndex, T &str){
std::string temp;
getString(columnIndex, temp);
str = temp;
str = T(temp);
}

View File

@ -692,7 +692,7 @@ bool RsDirUtil::getFileHash(const std::string& filepath, RsFileHash &hash, uint6
SHA1_Final(&sha_buf[0], sha_ctx);
hash = Sha1CheckSum(sha_buf).toStdString() ;
hash = Sha1CheckSum(sha_buf);
delete sha_ctx;
fclose(fd);

View File

@ -1,6 +1,5 @@
TEMPLATE = subdirs
SUBDIRS += \
LinksCloud \
VOIP \
FeedReader

View File

@ -290,7 +290,7 @@ void CreateCircleDialog::createCircle()
std::cerr << std::endl;
// set distribution from GUI.
circle.mMeta.mCircleId = "";
circle.mMeta.mCircleId.clear() ;
if (ui.radioButton_Public->isChecked())
{
std::cerr << "CreateCircleDialog::createCircle() Public Circle";
@ -342,7 +342,7 @@ void CreateCircleDialog::createCircle()
std::cerr << std::endl;
// set personal distribution
circle.mMeta.mCircleId = "";
circle.mMeta.mCircleId.clear() ;
circle.mMeta.mCircleType = GXS_CIRCLE_TYPE_LOCAL;
}
std::cerr << "CreateCircleDialog::createCircle() : mCircleType: " << circle.mMeta.mCircleType;

View File

@ -1949,7 +1949,7 @@ void TransfersDialog::showFileDetails()
for(int i = 0; i <= DLListModel->rowCount(); i++)
if(selection->isRowSelected(i, QModelIndex()))
{
file_hash = getID(i, DLListModel).toStdString();
file_hash = RsFileHash(getID(i, DLListModel).toStdString());
++nb_select ;
}
if(nb_select != 1)

View File

@ -362,7 +362,7 @@ void PostedListDialog::updateDisplayedItems(const std::vector<RsGxsMessageId> &m
void PostedListDialog::changedTopic(const QString &id)
{
mCurrTopicId = id.toStdString();
mCurrTopicId = RsGxsGroupId(id.toStdString());
insertThreads();
}

View File

@ -337,7 +337,7 @@ bool WikiDialog::getSelectedPage(RsGxsGroupId &groupId, RsGxsMessageId &pageId,
return false;
}
pageId = item->text(WIKI_GROUP_COL_PAGEID).toStdString();
pageId = RsGxsMessageId(item->text(WIKI_GROUP_COL_PAGEID).toStdString());
origPageId = RsGxsMessageId(item->text(WIKI_GROUP_COL_ORIGPAGEID).toStdString());
#ifdef WIKI_DEBUG
@ -559,7 +559,7 @@ void WikiDialog::wikiSubscribe(bool subscribe)
void WikiDialog::wikiGroupChanged(const QString &groupId)
{
mGroupId = groupId.toStdString();
mGroupId = RsGxsGroupId(groupId.toStdString());
if (mGroupId.isNull()) {
return;

View File

@ -162,7 +162,7 @@ void WikiEditDialog::historySelected()
RsGxsGrpMsgIdPair newSnapshot = mThreadMsgIdPair;
std::string pageId = item->data(WET_DATA_COLUMN, WET_ROLE_PAGEID).toString().toStdString();
newSnapshot.second = pageId;
newSnapshot.second = RsGxsMessageId(pageId);
std::cerr << "WikiEditDialog::historySelected() New PageId: " << pageId;
std::cerr << std::endl;
@ -469,10 +469,10 @@ void WikiEditDialog::submitEdit()
if (mNewPage)
{
mWikiSnapshot.mMeta.mGroupId = mWikiCollection.mMeta.mGroupId;
mWikiSnapshot.mMeta.mOrigMsgId = "";
mWikiSnapshot.mMeta.mMsgId = "";
mWikiSnapshot.mMeta.mParentId = "";
mWikiSnapshot.mMeta.mThreadId = "";
mWikiSnapshot.mMeta.mOrigMsgId.clear() ;
mWikiSnapshot.mMeta.mMsgId.clear() ;
mWikiSnapshot.mMeta.mParentId.clear() ;
mWikiSnapshot.mMeta.mThreadId.clear() ;
std::cerr << "WikiEditDialog::submitEdit() Is New Page";
std::cerr << std::endl;
@ -484,9 +484,9 @@ void WikiEditDialog::submitEdit()
// A New Version of the ThreadHead.
mWikiSnapshot.mMeta.mGroupId = mWikiCollection.mMeta.mGroupId;
mWikiSnapshot.mMeta.mOrigMsgId = mRepublishOrigId;
mWikiSnapshot.mMeta.mParentId = "";
mWikiSnapshot.mMeta.mThreadId = "";
mWikiSnapshot.mMeta.mMsgId = "";
mWikiSnapshot.mMeta.mParentId.clear() ;
mWikiSnapshot.mMeta.mThreadId.clear() ;
mWikiSnapshot.mMeta.mMsgId.clear() ;
}
else
{

View File

@ -123,7 +123,7 @@ bool GxsCircleChooser::getChosenCircle(RsGxsCircleId &id)
int idx = currentIndex();
QVariant var = itemData(idx);
id = var.toString().toStdString();
id = RsGxsCircleId(var.toString().toStdString());
return true;
}

View File

@ -80,7 +80,7 @@ void GxsCommentTreeWidget::setCurrentMsgId(QTreeWidgetItem *current, QTreeWidget
if(current)
{
mCurrentMsgId = current->text(PCITEM_COLUMN_MSGID).toStdString();
mCurrentMsgId = RsGxsMessageId(current->text(PCITEM_COLUMN_MSGID).toStdString());
}
}

View File

@ -629,7 +629,7 @@ bool GxsGroupDialog::setCircleParameters(RsGroupMetaData &meta)
meta.mCircleType = GXS_CIRCLE_TYPE_YOUREYESONLY;
meta.mCircleId.clear();
meta.mOriginator.clear();
meta.mInternalCircle = "Internal Circle Id";
meta.mInternalCircle.clear() ;
if (!ui.localComboBox->getChosenCircle(meta.mInternalCircle))
{

View File

@ -187,7 +187,7 @@ bool GxsIdChooser::getChosenId(RsGxsId &id)
int idx = currentIndex();
QVariant var = itemData(idx);
id = var.toString().toStdString();
id = RsGxsId(var.toString().toStdString());
return true;
}

View File

@ -617,9 +617,9 @@ void CreateGxsChannelMsg::sendMessage(const std::string &subject, const std::str
RsGxsChannelPost post;
post.mMeta.mGroupId = mChannelId;
post.mMeta.mParentId = "";
post.mMeta.mThreadId = "";
post.mMeta.mMsgId = "";
post.mMeta.mParentId.clear() ;
post.mMeta.mThreadId.clear() ;
post.mMeta.mMsgId.clear() ;
post.mMeta.mMsgName = subject;
post.mMsg = msg;

View File

@ -428,7 +428,7 @@ void GxsChannelDialog::restoreChannelKeys()
void GxsChannelDialog::selectChannel(const QString &id)
{
mChannelId = id.toStdString();
mChannelId = RsGxsGroupId(id.toStdString());
bool autoDl = rsGxsChannels->getChannelAutoDownload(mChannelId);
setAutoDownloadButton(autoDl);

View File

@ -271,7 +271,7 @@ void CreateGxsForumMsg::createMsg()
RsGxsForumMsg msg;
msg.mMeta.mGroupId = mForumId;
msg.mMeta.mParentId = mParentId;
msg.mMeta.mMsgId = "";
msg.mMeta.mMsgId.clear() ;
if (mParentMsgLoaded)
{
msg.mMeta.mThreadId = mParentMsg.mMeta.mThreadId;

View File

@ -473,7 +473,7 @@ void GxsForumThreadWidget::changedThread()
if (!item || !item->isSelected()) {
mThreadId.clear();
} else {
mThreadId = item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString();
mThreadId = RsGxsMessageId(item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString());
}
if (mFillThread) {

View File

@ -382,7 +382,7 @@ GxsForumThreadWidget *GxsForumsDialog::createThreadWidget(const RsGxsGroupId &fo
void GxsForumsDialog::changedForum(const QString &forumId)
{
mForumId = forumId.toStdString();
mForumId = RsGxsGroupId(forumId.toStdString());
if (mForumId.isNull()) {
return;
}

View File

@ -595,7 +595,7 @@ void MessageComposer::pasteRecommended()
if (links[i].valid() && links[i].type() == RetroShareLink::TYPE_FILE) {
FileInfo fileInfo;
fileInfo.fname = links[i].name().toStdString();
fileInfo.hash = links[i].hash().toStdString();
fileInfo.hash = RsFileHash(links[i].hash().toStdString());
fileInfo.size = links[i].size();
addFile(fileInfo);

View File

@ -321,7 +321,7 @@ void MessageWidget::getcurrentrecommended()
fi.size = it->data().toULongLong() ;
break ;
case COLUMN_FILE_HASH:
fi.hash = it->data().toString().toStdString() ;
fi.hash = RsFileHash(it->data().toString().toStdString()) ;
break ;
}
}

View File

@ -19,7 +19,6 @@
* Boston, MA 02110-1301, USA.
****************************************************************/
#include <QObject>
#include <QMessageBox>
#include <QSplashScreen>