1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

ChatMessage::createChatInfoMessage: use toHtmlChars

This commit is contained in:
krepa098 2015-01-25 15:53:13 +01:00
parent 6719ebebae
commit cae965e750

View File

@ -71,6 +71,7 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString &sender, const QSt
ChatMessage::Ptr ChatMessage::createChatInfoMessage(const QString &rawMessage, SystemMessageType type, const QDateTime &date)
{
ChatMessage::Ptr msg = ChatMessage::Ptr(new ChatMessage);
QString text = toHtmlChars(rawMessage);
QString img;
switch(type)
@ -81,7 +82,7 @@ ChatMessage::Ptr ChatMessage::createChatInfoMessage(const QString &rawMessage, S
}
msg->addColumn(new Image(QSizeF(18, 18), img), ColumnFormat(NAME_COL_WIDTH, ColumnFormat::FixedSize, ColumnFormat::Right));
msg->addColumn(new Text(rawMessage, Style::getFont(Style::Big), false, ""), ColumnFormat(1.0, ColumnFormat::VariableSize, ColumnFormat::Center));
msg->addColumn(new Text(text, Style::getFont(Style::Big), false, ""), ColumnFormat(1.0, ColumnFormat::VariableSize, ColumnFormat::Center));
msg->addColumn(new Timestamp(date, Settings::getInstance().getTimestampFormat(), Style::getFont(Style::Big)), ColumnFormat(TIME_COL_WIDTH, ColumnFormat::FixedSize, ColumnFormat::Right));
return msg;