equal
deleted
inserted
replaced
76 void HWChatWidget::onChatString(const QString& str) |
76 void HWChatWidget::onChatString(const QString& str) |
77 { |
77 { |
78 if (chatStrings.size() > 250) |
78 if (chatStrings.size() > 250) |
79 chatStrings.removeFirst(); |
79 chatStrings.removeFirst(); |
80 |
80 |
81 QString formattedStr = Qt::escape(str); |
81 QString formattedStr = Qt::escape(str.mid(1)); |
82 if (formattedStr.startsWith("[")) |
82 if (str.startsWith("\x03")) |
83 formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr); |
83 formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr); |
|
84 else if (str.startsWith("\x02")) |
|
85 formattedStr = QString("<font color=magenta>%1</font>").arg(formattedStr); |
|
86 |
84 |
87 |
85 chatStrings.append(formattedStr); |
88 chatStrings.append(formattedStr); |
86 |
89 |
87 chatText->setHtml(chatStrings.join("<br>")); |
90 chatText->setHtml(chatStrings.join("<br>")); |
88 |
91 |