[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:55 UTC 2016


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

The following commit has been merged in the master branch:
commit 0d34fcabdc8f4cae89d86677f54186c8be4958c7
Author: Lasath Fernando <kde at lasath.org>
Date:   Tue Apr 17 15:23:06 2012 +1000

    Move AbstractMessageFilter to it's own file
    
    The reason it's currently in message-processor.h is because it
    is to small to warrant it's own file. However, since it is now
    going to be exported and included separately by plugins, it kind
    of has to be.
---
 lib/CMakeLists.txt                                 |  3 ++-
 lib/abstract-message-filter.cpp                    |  1 +
 ...oticon-filter.cpp => abstract-message-filter.h} | 28 +++++++++-------------
 lib/message-processor.h                            | 11 +--------
 4 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6fcce7a..736a498 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -13,13 +13,14 @@ set(ktpchat_SRCS
         chat-search-bar.cpp
         logmanager.cpp
         message.cpp
+        abstract-message-filter.cpp
         message-processor.cpp
         url-filter.cpp
-        emoticon-filter.cpp
         escape-filter.cpp
 )
 
 set(ktpchat_HDRS
+    abstract-message-filter.h
     adium-theme-content-info.h
     adium-theme-header-info.h
     adium-theme-message-info.h
diff --git a/lib/abstract-message-filter.cpp b/lib/abstract-message-filter.cpp
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/lib/abstract-message-filter.cpp
@@ -0,0 +1 @@
+
diff --git a/lib/emoticon-filter.cpp b/lib/abstract-message-filter.h
similarity index 67%
rename from lib/emoticon-filter.cpp
rename to lib/abstract-message-filter.h
index 396c8c5..6c13d8e 100644
--- a/lib/emoticon-filter.cpp
+++ b/lib/abstract-message-filter.h
@@ -16,26 +16,20 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#include "filters.h"
+#ifndef ABSTRACTPLUGIN_H
+#define ABSTRACTPLUGIN_H
 
-class EmoticonFilter::Private
+#include "message.h"
+
+class AbstractMessageFilter : public QObject
 {
+Q_OBJECT
 public:
-    KEmoticons emoticons;
-};
+    explicit AbstractMessageFilter(QObject* parent = 0);
+    virtual ~AbstractMessageFilter();
 
-EmoticonFilter::EmoticonFilter(QObject *parent)
-    : AbstractMessageFilter(parent),
-      d(new Private)
-{
-}
+    virtual void filterMessage(Message &message) = 0;
+};
 
-void EmoticonFilter::filterMessage(Message& message)
-{
-    message.setMainMessagePart(d->emoticons.theme().parseEmoticons(message.mainMessagePart()));
-}
+#endif // ABSTRACTPLUGIN_H
 
-EmoticonFilter::~EmoticonFilter()
-{
-    delete d;
-}
diff --git a/lib/message-processor.h b/lib/message-processor.h
index d6228b5..926e613 100644
--- a/lib/message-processor.h
+++ b/lib/message-processor.h
@@ -21,22 +21,13 @@
 #define MESSAGE_PROCESSOR_H
 
 #include "message.h"
+#include "abstract-message-filter.h"
 
 #include <QList>
 
 #include <ktpchat_export.h>
 
 
-class AbstractMessageFilter : public QObject
-{
-Q_OBJECT
-public:
-    explicit AbstractMessageFilter(QObject* parent = 0);
-    virtual ~AbstractMessageFilter();
-
-    virtual void filterMessage(Message &message) = 0;
-};
-
 //each thing that displays message will have an instance of this
 class KDE_TELEPATHY_CHAT_EXPORT MessageProcessor : public QObject
 {

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list