Fixed replacing of %color% in ChatStyle. It should not be replaced after %message%.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5182 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-05-23 09:19:50 +00:00
parent 22a0f89751
commit 56e156a65a

View File

@ -301,8 +301,8 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
m_style[type] = style;
}
QColor color;
#ifdef COLORED_NICKNAMES
QColor color;
if (flag & CHAT_FORMATMSG_SYSTEM) {
color = Qt::darkBlue;
} else {
@ -326,8 +326,10 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
QString formatMsg = style.replace("%name%", name)
.replace("%date%", timestamp.date().toString("dd.MM.yyyy"))
.replace("%time%", timestamp.time().toString("hh:mm:ss"))
.replace("%message%", message)
.replace("%color%", color.name());
#ifdef COLORED_NICKNAMES
.replace("%color%", color.name())
#endif
.replace("%message%", message);
return formatMsg;
}