mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
- 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
This commit is contained in:
parent
48d2007f81
commit
5a65dabc09
@ -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,out] currentElement The current node (which is of type Element)
|
||||||
* @param[in] embedInfos The regular expression and the type of embedding to use
|
* @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
|
if(embedInfos.myRE.pattern().length() == 0) // we'll get stuck with an empty regexp
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -799,13 +799,6 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file)
|
|||||||
rsiface->unlockData(); /* Unlock Interface */
|
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 = "<a href='file:?fileHash=" + (file->FileHash()) + "&fileName=" + (file->FileName()) + "&fileSize=" + fileSize + "'>" + (file->FileName()) + "</a>";
|
|
||||||
|
|
||||||
std::string mesgString = RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtml().toStdString() ;
|
std::string mesgString = RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtml().toStdString() ;
|
||||||
|
|
||||||
#ifdef CHAT_DEBUG
|
#ifdef CHAT_DEBUG
|
||||||
|
@ -368,7 +368,7 @@ void CreateForumMsg::fileHashingFinished(AttachFileItem* file) {
|
|||||||
|
|
||||||
//convert fileSize from uint_64 to string for html link
|
//convert fileSize from uint_64 to string for html link
|
||||||
char fileSizeChar [100];
|
char fileSizeChar [100];
|
||||||
sprintf(fileSizeChar, "%lld", file->FileSize());
|
sprintf(fileSizeChar, "%llu", (unsigned long long int)file->FileSize());
|
||||||
std::string fileSize = *(&fileSizeChar);
|
std::string fileSize = *(&fileSizeChar);
|
||||||
|
|
||||||
std::string mesgString = "<a href='retroshare://file|" + (file->FileName()) + "|" + fileSize + "|" + (file->FileHash()) + "'>"
|
std::string mesgString = "<a href='retroshare://file|" + (file->FileName()) + "|" + fileSize + "|" + (file->FileHash()) + "'>"
|
||||||
|
Loading…
Reference in New Issue
Block a user