equal
deleted
inserted
replaced
73 |
73 |
74 void HWChatWidget::onChatString(const QString& str) |
74 void HWChatWidget::onChatString(const QString& str) |
75 { |
75 { |
76 if (chatStrings.size() > 250) |
76 if (chatStrings.size() > 250) |
77 chatStrings.removeFirst(); |
77 chatStrings.removeFirst(); |
|
78 |
|
79 QString formattedStr = Qt::escape(str); |
|
80 if (formattedStr.startsWith("***")) |
|
81 formattedStr = QString("<font color=grey>%1</font>").arg(formattedStr); |
78 |
82 |
79 chatStrings.append(Qt::escape(str)); |
83 chatStrings.append(formattedStr); |
80 |
84 |
81 chatText->setHtml(chatStrings.join("<br>")); |
85 chatText->setHtml(chatStrings.join("<br>")); |
82 |
86 |
83 chatText->moveCursor(QTextCursor::End); |
87 chatText->moveCursor(QTextCursor::End); |
84 } |
88 } |