[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:21:06 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=73a52d6

The following commit has been merged in the master branch:
commit 73a52d67fee1523be5a1578e2c619ea65d8d4bcc
Author: Lasath Fernando <kde at lasath.org>
Date:   Thu Feb 2 13:10:27 2012 +1100

    Move emoticon code from replaceMessageKeywords() to EmoticonFilter
---
 lib/CMakeLists.txt        |  1 +
 lib/adium-theme-view.cpp  |  1 -
 lib/filters.h             | 10 +++++++---
 lib/message-processor.cpp |  2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 2691c8d..e381b6c 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -15,6 +15,7 @@ set(ktpchat_SRCS
         message.cpp
         message-processor.cpp
         url-filter.cpp
+        emoticon-filter.cpp
 )
 
 set(ktpchat_HDRS
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index ef51945..bb8ba20 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -464,7 +464,6 @@ QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const Adiu
 //         }
 //     }
 
-    message = m_emoticons.theme().parseEmoticons(message);
     htmlTemplate.replace(QLatin1String("%message%"), message);
 
     //service
diff --git a/lib/filters.h b/lib/filters.h
index f54425f..bc955c0 100644
--- a/lib/filters.h
+++ b/lib/filters.h
@@ -1,17 +1,21 @@
 
 #include "message-processor.h"
 
+#include <KEmoticons>
+
 class UrlFilter : public AbstractMessageFilter
 {
-    virtual void filterMessage(Message& message);
+    void filterMessage(Message& message);
 };
 
 class ImageFilter : public AbstractMessageFilter
 {
-    virtual void filterMessage(Message& message);
+    void filterMessage(Message& message);
 };
 
 class EmoticonFilter : public AbstractMessageFilter
 {
-    virtual void filterMessage(Message& message);
+    void filterMessage(Message& message);
+private:
+    KEmoticons m_emoticons;
 };
\ No newline at end of file
diff --git a/lib/message-processor.cpp b/lib/message-processor.cpp
index 1854549..e35f97f 100644
--- a/lib/message-processor.cpp
+++ b/lib/message-processor.cpp
@@ -43,7 +43,7 @@ MessageProcessor* MessageProcessor::instance()
 
 MessageProcessor::MessageProcessor()
 {
-    m_filters << new UrlFilter();
+    m_filters << new UrlFilter() << new EmoticonFilter();
 }
 
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list