[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:14 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=6571aa0

The following commit has been merged in the master branch:
commit 6571aa029d96db40bc15c3b5f4fa21bb36ccb4a6
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.
---
 KTp/abstract-message-filter.cpp                    | 40 ----------------------
 ...essage-filter.cpp => abstract-message-filter.h} | 28 ++++++---------
 KTp/message-processor.h                            | 11 +-----
 3 files changed, 12 insertions(+), 67 deletions(-)

diff --git a/KTp/abstract-message-filter.cpp b/KTp/abstract-message-filter.cpp
index 396c8c5..8b13789 100644
--- a/KTp/abstract-message-filter.cpp
+++ b/KTp/abstract-message-filter.cpp
@@ -1,41 +1 @@
-/*
-    Copyright (C) 2012  Lasath Fernando <kde at lasath.org>
 
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#include "filters.h"
-
-class EmoticonFilter::Private
-{
-public:
-    KEmoticons emoticons;
-};
-
-EmoticonFilter::EmoticonFilter(QObject *parent)
-    : AbstractMessageFilter(parent),
-      d(new Private)
-{
-}
-
-void EmoticonFilter::filterMessage(Message& message)
-{
-    message.setMainMessagePart(d->emoticons.theme().parseEmoticons(message.mainMessagePart()));
-}
-
-EmoticonFilter::~EmoticonFilter()
-{
-    delete d;
-}
diff --git a/KTp/abstract-message-filter.cpp b/KTp/abstract-message-filter.h
similarity index 67%
copy from KTp/abstract-message-filter.cpp
copy to KTp/abstract-message-filter.h
index 396c8c5..6c13d8e 100644
--- a/KTp/abstract-message-filter.cpp
+++ b/KTp/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/KTp/message-processor.h b/KTp/message-processor.h
index d6228b5..926e613 100644
--- a/KTp/message-processor.h
+++ b/KTp/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-common-internals packaging



More information about the pkg-kde-commits mailing list