From 5a65dabc093ec137e624d769987c941dda71e4de Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 16 May 2010 20:06:04 +0000 Subject: [PATCH] - suppressed some errors in printf commands with uint64_t - apparently, the cap function in QRegExp takes a non const in some Qt versions. I had to copy the const parameter to a local variable. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2918 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/HandleRichText.cpp | 4 +++- retroshare-gui/src/gui/chat/PopupChatDialog.cpp | 7 ------- retroshare-gui/src/gui/forums/CreateForumMsg.cpp | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/retroshare-gui/src/gui/chat/HandleRichText.cpp b/retroshare-gui/src/gui/chat/HandleRichText.cpp index c3e5a4271..afb00ed35 100644 --- a/retroshare-gui/src/gui/chat/HandleRichText.cpp +++ b/retroshare-gui/src/gui/chat/HandleRichText.cpp @@ -55,8 +55,10 @@ void EmbedInHtmlImg::InitFromAwkwardHash(const QHash< QString, QString >& hash) * @param[in,out] currentElement The current node (which is of type Element) * @param[in] embedInfos The regular expression and the type of embedding to use */ -void embedHtml(QDomDocument& doc, QDomElement& currentElement, const EmbedInHtml& embedInfos) +void embedHtml(QDomDocument& doc, QDomElement& currentElement, const EmbedInHtml& _embedInfos) { + EmbedInHtml embedInfos(_embedInfos) ; + if(embedInfos.myRE.pattern().length() == 0) // we'll get stuck with an empty regexp return; diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index a148fdda7..0258c5579 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -799,13 +799,6 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file) rsiface->unlockData(); /* Unlock Interface */ } - //convert fileSize from uint_64 to string for html link - char fileSizeChar [100]; - sprintf(fileSizeChar, "%lld", file->FileSize()); - std::string fileSize = *(&fileSizeChar); - -// std::string mesgString = "" + (file->FileName()) + ""; - std::string mesgString = RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtml().toStdString() ; #ifdef CHAT_DEBUG diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp index 64406b920..d2e4d6d0d 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp @@ -368,7 +368,7 @@ void CreateForumMsg::fileHashingFinished(AttachFileItem* file) { //convert fileSize from uint_64 to string for html link char fileSizeChar [100]; - sprintf(fileSizeChar, "%lld", file->FileSize()); + sprintf(fileSizeChar, "%llu", (unsigned long long int)file->FileSize()); std::string fileSize = *(&fileSizeChar); std::string mesgString = ""