mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 08:29:32 -05:00
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
This commit is contained in:
parent
00ef48b45d
commit
8348e2a556
@ -30,6 +30,9 @@ void EmbedInHtmlImg::InitFromAwkwardHash(const QHash< QString, QString >& hash)
|
|||||||
QString newRE;
|
QString newRE;
|
||||||
for(QHash<QString,QString>::const_iterator it = hash.begin(); it != hash.end(); ++it)
|
for(QHash<QString,QString>::const_iterator it = hash.begin(); it != hash.end(); ++it)
|
||||||
foreach(QString smile, it.key().split("|")) {
|
foreach(QString smile, it.key().split("|")) {
|
||||||
|
if (smile.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
smileys.insert(smile, it.value());
|
smileys.insert(smile, it.value());
|
||||||
newRE += "(" + QRegExp::escape(smile) + ")|";
|
newRE += "(" + QRegExp::escape(smile) + ")|";
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,6 @@ void Emoticons::load()
|
|||||||
{
|
{
|
||||||
smcode += sm_codes[i];
|
smcode += sm_codes[i];
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
@ -107,6 +106,10 @@ void Emoticons::load()
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
if(!smcode.isEmpty() && !smfile.isEmpty()) {
|
if(!smcode.isEmpty() && !smfile.isEmpty()) {
|
||||||
|
while (smcode.right(1) == "|") {
|
||||||
|
smcode.remove(smcode.length() - 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (internalEmoticons) {
|
if (internalEmoticons) {
|
||||||
Smileys.insert(smcode, ":/"+smfile);
|
Smileys.insert(smcode, ":/"+smfile);
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"(T)|(t)":"smileys/phone.png";
|
"(T)|(t)":"smileys/phone.png";
|
||||||
"P)":"smileys/pirate.png";
|
"P)":"smileys/pirate.png";
|
||||||
"(~~)":"smileys/pumpkin.png";
|
"(~~)":"smileys/pumpkin.png";
|
||||||
":X|:x|:-x|:-X|":"smileys/amorous.png";
|
":X|:x|:-x|:-X":"smileys/amorous.png";
|
||||||
"(ip)":"smileys/island.png";
|
"(ip)":"smileys/island.png";
|
||||||
"(^)":"smileys/cake.png";
|
"(^)":"smileys/cake.png";
|
||||||
"<:-P|<:-p":"smileys/party.png";
|
"<:-P|<:-p":"smileys/party.png";
|
||||||
|
Loading…
Reference in New Issue
Block a user