[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=da28f38
The following commit has been merged in the master branch:
commit da28f38b56238f9f2c177ce0a0d71904078691d4
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.
---
KTp/message-escape-filter.cpp | 40 ----------------------------------------
KTp/message-filters-private.h | 7 -------
KTp/message-processor.cpp | 2 +-
3 files changed, 1 insertion(+), 48 deletions(-)
diff --git a/KTp/message-escape-filter.cpp b/KTp/message-escape-filter.cpp
deleted file mode 100644
index fd5cc37..0000000
--- a/KTp/message-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/KTp/message-filters-private.h b/KTp/message-filters-private.h
index 4a4616c..34a4daa 100644
--- a/KTp/message-filters-private.h
+++ b/KTp/message-filters-private.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/KTp/message-processor.cpp b/KTp/message-processor.cpp
index c89c12f..2e39832 100644
--- a/KTp/message-processor.cpp
+++ b/KTp/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-common-internals packaging
More information about the pkg-kde-commits
mailing list