From f3b3d2b262e2a43ba82dcef2895f21ace696e174 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 19 Jan 2017 14:01:54 +0100 Subject: [PATCH] disabled emoticon replacement in GxsChannelPostItem and chat lobby toaster and chat toaster, where there are not needed as compare to how problematic they can be --- retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp | 4 +++- retroshare-gui/src/gui/toaster/ChatLobbyToaster.cpp | 4 +++- retroshare-gui/src/gui/toaster/ChatToaster.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 72547c195..22d90e5a2 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -199,7 +199,9 @@ QString GxsChannelPostItem::getTitleLabel() QString GxsChannelPostItem::getMsgLabel() { - return RsHtml().formatText(NULL, QString::fromUtf8(mPost.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); + //return RsHtml().formatText(NULL, QString::fromUtf8(mPost.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); + // Disabled, because emoticon replacement kills performance. + return QString::fromUtf8(mPost.mMsg.c_str()); } QString GxsChannelPostItem::groupName() diff --git a/retroshare-gui/src/gui/toaster/ChatLobbyToaster.cpp b/retroshare-gui/src/gui/toaster/ChatLobbyToaster.cpp index 25d5c2d2a..f6e6870c4 100644 --- a/retroshare-gui/src/gui/toaster/ChatLobbyToaster.cpp +++ b/retroshare-gui/src/gui/toaster/ChatLobbyToaster.cpp @@ -36,7 +36,9 @@ ChatLobbyToaster::ChatLobbyToaster(const ChatLobbyId &lobby_id, const RsGxsId &s connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); /* set informations */ - ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + //ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + // Disabled, because emoticon replacement kills performance + ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_CLEANSTYLE)); ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME); ui.avatarWidget->setDefaultAvatar(":images/chat_64.png"); diff --git a/retroshare-gui/src/gui/toaster/ChatToaster.cpp b/retroshare-gui/src/gui/toaster/ChatToaster.cpp index 0da74f301..fe98fdb6a 100644 --- a/retroshare-gui/src/gui/toaster/ChatToaster.cpp +++ b/retroshare-gui/src/gui/toaster/ChatToaster.cpp @@ -34,7 +34,9 @@ ChatToaster::ChatToaster(const RsPeerId &peer_id, const QString &message) : QWid connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); /* set informations */ - ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + //ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + // emoticons disabled because they kill performance. + ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_CLEANSTYLE)); ui.toasterLabel->setText(QString::fromUtf8(rsPeers->getPeerName(mPeerId).c_str())); ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatarWidget->setId(ChatId(mPeerId));