Commit Graph

4 Commits

Author SHA1 Message Date
thunder2
8348e2a556 Fixed endless loop at startup of RetroShare, with a wrong definition of a smiley string in emotes.acs.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3498 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-09-15 14:32:09 +00:00
leander-256
5f2f87537b Because some versions of Qt require a non-const QRegExp, we copy _embedInfos to
a non-const variable:

EmbedInHtml embedInfos(_embedInfos) ;

However, since EmbedInHtml is the base class we lose any information added in
the derived class, which causes a problem with EmbedInHtmlImg when we do a
static_cast to what should have been the proper type here:

const EmbedInHtmlImg& embedImg = static_cast<const EmbedInHtmlImg&>(embedInfos);

embedInfos is not an EmbedInHtmlImg any more, just a mere EmbedInHtml.

We could const_cast the QRegExp object instead but let's keep it simple and
remove the embedInfos constness from the method's signature.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3078 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-07 00:49:26 +00:00
csoler
5a65dabc09 - 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
2010-05-16 20:06:04 +00:00
leander-256
988c6c31f5 Fixes two problems in the current group chat:
- the parser fails to embed two links in the same sentence
- the parser can potentially put smileys in the middle of <a> tags

Solution:
Since the message is in HTML, it is parsed into a DOM tree, then that DOM tree
is traversed and only the text nodes are parsed (see HandleRichText.cpp for
details).

Bonus fixes:
- missing std:: for endl (which was falling back to its Qt counterpart)
- commenting useless code in PeersDialog::smileyWidgetgroupchat()
- replacing int by size_t
- RetroShare.pro now queries gpgme-config for its include path


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2888 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-12 00:17:10 +00:00