From 57a7324d41b505effe673c728849647e250334b9 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Tue, 29 Jul 2014 10:59:58 +0200 Subject: [PATCH] fast concatenation --- smileypack.cpp | 4 ++-- smileypack.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smileypack.cpp b/smileypack.cpp index 4ff7a90e9..33339f018 100644 --- a/smileypack.cpp +++ b/smileypack.cpp @@ -103,7 +103,7 @@ QString SmileyPack::replaceEmoticons(const QString &msg) loadSmiley(file); } - QString imgRichText = ""; + QString imgRichText = ""; out.replace(index + offset, key.length(), imgRichText); offset += imgRichText.length() - key.length(); @@ -117,7 +117,7 @@ QString SmileyPack::replaceEmoticons(const QString &msg) void SmileyPack::loadSmiley(const QString &name) { QSize size(16, 16); // TODO: adapt to text size - QString filename = path + "/" + name; + QString filename = path % "/" % name; QImage img(filename); if (!img.isNull()) diff --git a/smileypack.h b/smileypack.h index b0395bc1c..6ae7f7260 100644 --- a/smileypack.h +++ b/smileypack.h @@ -42,7 +42,7 @@ private: void loadSmiley(const QString& name); QHash assignmentTable; // matches an emoticon to its corresponding smiley - QHash cache; + QHash cache; QString path; // directory containing the cfg file };