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


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

The following commit has been merged in the master branch:
commit 69549aa2bfaf9364504391324fb4e577570bcb83
Author: Lasath Fernando <kde at lasath.org>
Date:   Fri Feb 3 19:34:27 2012 +1100

    Create d-pointer for EmoticonFilter and add missing cpp file.
---
 .../qml-plugins.h => lib/emoticon-filter.cpp       | 28 +++++++++++++++-------
 lib/filters.h                                      |  5 +++-
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/plasmoid/declarative-plugin/qml-plugins.h b/lib/emoticon-filter.cpp
similarity index 63%
copy from plasmoid/declarative-plugin/qml-plugins.h
copy to lib/emoticon-filter.cpp
index eb8cfd4..0e37aab 100644
--- a/plasmoid/declarative-plugin/qml-plugins.h
+++ b/lib/emoticon-filter.cpp
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
+    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
@@ -16,16 +16,26 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
+#include "filters.h"
 
-#ifndef QML_PLUGINS_H
-#define QML_PLUGINS_H
-
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-
-class QmlPlugins : public QDeclarativeExtensionPlugin
+class EmoticonFilter::Private
 {
 public:
-    virtual void registerTypes(const char *uri);
+    KEmoticons emoticons;
 };
 
-#endif // QML_PLUGINS_H
+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;
+}
\ No newline at end of file
diff --git a/lib/filters.h b/lib/filters.h
index 29a0359..ce5cc06 100644
--- a/lib/filters.h
+++ b/lib/filters.h
@@ -40,7 +40,10 @@ class EmoticonFilter : public AbstractMessageFilter
 {
 public:
     explicit EmoticonFilter(QObject* parent = 0);
+    virtual ~EmoticonFilter();
+
     void filterMessage(Message& message);
 private:
-    KEmoticons m_emoticons;
+    class Private;
+    Private *d;
 };
\ No newline at end of file

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list