From 9bbd7a5c94fed651e53aa27b00ac7f48e48df5ef Mon Sep 17 00:00:00 2001 From: krepa098 Date: Sun, 15 Feb 2015 14:25:49 +0100 Subject: [PATCH] fix issue #1161 --- src/chatlog/customtextdocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chatlog/customtextdocument.cpp b/src/chatlog/customtextdocument.cpp index 71ba6200b..35955a9ef 100644 --- a/src/chatlog/customtextdocument.cpp +++ b/src/chatlog/customtextdocument.cpp @@ -38,7 +38,9 @@ QVariant CustomTextDocument::loadResource(int type, const QUrl &name) if (type == QTextDocument::ImageResource && name.scheme() == "key") { QSize size = QSize(Settings::getInstance().getEmojiFontPointSize(),Settings::getInstance().getEmojiFontPointSize()); - return SmileyPack::getInstance().getAsIcon(name.fileName()).pixmap(size); + QString fileName = name.toString().mid(4); + + return SmileyPack::getInstance().getAsIcon(fileName).pixmap(size); } return QTextDocument::loadResource(type, name);