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


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

The following commit has been merged in the master branch:
commit 1e7fb1c1a78de30e702754dc149e30caabfc387d
Author: Lasath Fernando <kde at lasath.org>
Date:   Tue May 1 12:13:22 2012 +1000

    Remove EscapeFilter
    
    This commit removes it completely from /lib. It will be added as a
    plugin in a later commit.
    
    Note: testEscape() now fails.
---
 lib/CMakeLists.txt        |  1 -
 lib/escape-filter.cpp     | 40 ----------------------------------------
 lib/filters.h             |  7 -------
 lib/message-processor.cpp |  2 +-
 4 files changed, 1 insertion(+), 49 deletions(-)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index f172936..eec5c50 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -16,7 +16,6 @@ set(ktpchat_SRCS
         abstract-message-filter.cpp
         message-processor.cpp
         url-filter.cpp
-        escape-filter.cpp
 )
 
 set(ktpchat_HDRS
diff --git a/lib/escape-filter.cpp b/lib/escape-filter.cpp
deleted file mode 100644
index fd5cc37..0000000
--- a/lib/escape-filter.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-    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"
-
-#include <QtGui/QTextDocument> //needed for Qt::escape
-
-EscapeFilter::EscapeFilter(QObject *parent)
-    : AbstractMessageFilter(parent)
-{
-}
-
-void EscapeFilter::filterMessage(Message& message)
-{
-    QString escapedMessage = Qt::escape(message.mainMessagePart());
-
-    escapedMessage.replace(QLatin1String("
 "), QLatin1String("<br/> ")); //keep leading whitespaces
-    escapedMessage.replace(QLatin1Char('
'), QLatin1String("<br/>"));
-    escapedMessage.replace(QLatin1Char('
'), QLatin1String("<br/>"));
-    escapedMessage.replace(QLatin1Char('	'), QLatin1String("    ")); // replace tabs by 4 spaces
-    escapedMessage.replace(QLatin1String("  "), QLatin1String("  ")); // keep multiple whitespaces
-    escapedMessage.replace(QLatin1Char('\'), QLatin1String("\\")); //replace a single backslash with two backslashes.
-
-    message.setMainMessagePart(escapedMessage);
-}
diff --git a/lib/filters.h b/lib/filters.h
index 4a4616c..34a4daa 100644
--- a/lib/filters.h
+++ b/lib/filters.h
@@ -30,11 +30,4 @@ public:
     void filterMessage(Message &message);
 };
 
-class EscapeFilter : public AbstractMessageFilter
-{
-public:
-    explicit EscapeFilter(QObject *parent = 0);
-    virtual void filterMessage(Message &message);
-};
-
 #endif
diff --git a/lib/message-processor.cpp b/lib/message-processor.cpp
index c89c12f..2e39832 100644
--- a/lib/message-processor.cpp
+++ b/lib/message-processor.cpp
@@ -46,7 +46,7 @@ MessageProcessor* MessageProcessor::instance()
 
 MessageProcessor::MessageProcessor()
 {
-    m_filters << new EscapeFilter(this) << new UrlFilter(this);
+    m_filters << new UrlFilter(this);
     loadAllPlugins();
 }
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list