From 7bbb993769c231eb2871eba60939e215f787553f Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 20 Jan 2017 23:00:05 +0100 Subject: [PATCH] disabled emoticons from messages and toasters, since they significantly slow down the whole software --- plugins/VOIP/gui/VOIPToasterItem.cpp | 4 +++- retroshare-gui/src/gui/feeds/MsgItem.cpp | 4 +++- retroshare-gui/src/gui/msgs/MessageWidget.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/VOIP/gui/VOIPToasterItem.cpp b/plugins/VOIP/gui/VOIPToasterItem.cpp index 54659caac..f1791a9c6 100644 --- a/plugins/VOIP/gui/VOIPToasterItem.cpp +++ b/plugins/VOIP/gui/VOIPToasterItem.cpp @@ -55,7 +55,9 @@ VOIPToasterItem::VOIPToasterItem(const RsPeerId &peer_id, const QString &msg, co connect(closeButton, SIGNAL(clicked()), SLOT(hide())); /* set informations */ - textLabel->setText(RsHtml().formatText(NULL, msg, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + // emoticons disabled because of crazy cost + //textLabel->setText(RsHtml().formatText(NULL, msg, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); + textLabel->setText(RsHtml().formatText(NULL, msg, RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); //toasterLabel->setText(QString::fromUtf8(rsPeers->getPeerName(mPeerId).c_str())); avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); avatarWidget->setId(ChatId(mPeerId)); diff --git a/retroshare-gui/src/gui/feeds/MsgItem.cpp b/retroshare-gui/src/gui/feeds/MsgItem.cpp index cacd739dd..c56173e59 100644 --- a/retroshare-gui/src/gui/feeds/MsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/MsgItem.cpp @@ -177,7 +177,9 @@ void MsgItem::updateItemStatic() void MsgItem::fillExpandFrame() { - msgLabel->setText(RsHtml().formatText(NULL, mMsg, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); + // emoticons disabled because of crazy cost. + //msgLabel->setText(RsHtml().formatText(NULL, mMsg, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS)); + msgLabel->setText(RsHtml().formatText(NULL, mMsg, RSHTML_FORMATTEXT_EMBED_LINKS)); } void MsgItem::updateItem() diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp index cbffc00dd..bf1cafee3 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp +++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp @@ -571,7 +571,9 @@ void MessageWidget::fill(const std::string &msgId) ui.subjectText->setText(QString::fromUtf8(msgInfo.title.c_str())); - text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); + // emoticons disabled because of crazy cost. + //text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS); + text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_LINKS); ui.msgText->resetImagesStatus(Settings->getMsgLoadEmbeddedImages() || (msgInfo.msgflags & RS_MSG_LOAD_EMBEDDED_IMAGES)); ui.msgText->setHtml(text);