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


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

The following commit has been merged in the master branch:
commit c77e98f5f8b2b2f8fc8fad1ca2c5dd5bd21dc53c
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Wed Feb 6 16:05:34 2013 +0000

    Compile against newer MessageProcessor
    
    BUG: 309152
    REVIEW: 108813
---
 filters/emoticons/emoticon-filter.cpp |  5 +++--
 filters/emoticons/emoticon-filter.h   |  4 ++--
 filters/formatting/format-filter.cpp  |  3 ++-
 filters/formatting/format-filter.h    |  2 +-
 filters/images/images-filter.cpp      |  3 ++-
 filters/images/images-filter.h        |  2 +-
 filters/texttospeech/tts-filter.cpp   | 11 ++++++++++-
 filters/texttospeech/tts-filter.h     |  2 +-
 lib/chat-widget.cpp                   |  4 ++--
 lib/logmanager.cpp                    |  3 +--
 logviewer/message-view.cpp            |  2 +-
 11 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/filters/emoticons/emoticon-filter.cpp b/filters/emoticons/emoticon-filter.cpp
index 194e449..280fa5b 100644
--- a/filters/emoticons/emoticon-filter.cpp
+++ b/filters/emoticons/emoticon-filter.cpp
@@ -33,8 +33,9 @@ EmoticonFilter::EmoticonFilter(QObject *parent, const QVariantList &)
 {
 }
 
-void EmoticonFilter::filterMessage(KTp::Message& message)
+void EmoticonFilter::filterMessage(KTp::Message &message, const KTp::MessageContext &context)
 {
+    Q_UNUSED(context)
     message.setMainMessagePart(d->emoticons.theme().parseEmoticons(message.mainMessagePart()));
 }
 
@@ -46,4 +47,4 @@ EmoticonFilter::~EmoticonFilter()
 K_PLUGIN_FACTORY(MessageFilterFactory, registerPlugin<EmoticonFilter>();)
 K_EXPORT_PLUGIN(MessageFilterFactory("ktptextui_message_filter_emoticons"))
 
-#include "moc_emoticon-filter.cpp"
\ No newline at end of file
+#include "moc_emoticon-filter.cpp"
diff --git a/filters/emoticons/emoticon-filter.h b/filters/emoticons/emoticon-filter.h
index 8b54305..0f5a1ec 100644
--- a/filters/emoticons/emoticon-filter.h
+++ b/filters/emoticons/emoticon-filter.h
@@ -29,10 +29,10 @@ public:
     EmoticonFilter(QObject* parent, const QVariantList &);
     virtual ~EmoticonFilter();
 
-    void filterMessage(KTp::Message& message);
+    void filterMessage(KTp::Message &message, const KTp::MessageContext &context);
 private:
     class Private;
     Private *d;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/filters/formatting/format-filter.cpp b/filters/formatting/format-filter.cpp
index 74e9724..53c7024 100644
--- a/filters/formatting/format-filter.cpp
+++ b/filters/formatting/format-filter.cpp
@@ -78,8 +78,9 @@ FormatFilter::~FormatFilter()
     delete d;
 }
 
-void FormatFilter::filterMessage (KTp::Message& message)
+void FormatFilter::filterMessage (KTp::Message& message, const KTp::MessageContext &context)
 {
+    Q_UNUSED(context)
     message.setMainMessagePart(d->filterString(message.mainMessagePart()));
 }
 
diff --git a/filters/formatting/format-filter.h b/filters/formatting/format-filter.h
index 96f2b8c..0713a1c 100644
--- a/filters/formatting/format-filter.h
+++ b/filters/formatting/format-filter.h
@@ -28,7 +28,7 @@ Q_OBJECT
 public:
     FormatFilter (QObject* parent, const QVariantList &);
     virtual ~FormatFilter();
-    virtual void filterMessage (KTp::Message& message);
+    virtual void filterMessage (KTp::Message &message, const KTp::MessageContext &context);
 
 private:
     class Private;
diff --git a/filters/images/images-filter.cpp b/filters/images/images-filter.cpp
index ed18a5a..4cd7994 100644
--- a/filters/images/images-filter.cpp
+++ b/filters/images/images-filter.cpp
@@ -50,8 +50,9 @@ ImagesFilter::~ImagesFilter()
     delete d;
 }
 
-void ImagesFilter::filterMessage (KTp::Message& message)
+void ImagesFilter::filterMessage(KTp::Message &message, const KTp::MessageContext &context)
 {
+    Q_UNUSED(context)
     kDebug() << message.property("Urls").toList().size();
     Q_FOREACH (const QVariant &var, message.property("Urls").toList()) {
         const KUrl url = qvariant_cast<KUrl>(var);
diff --git a/filters/images/images-filter.h b/filters/images/images-filter.h
index 807de4b..72ecea3 100644
--- a/filters/images/images-filter.h
+++ b/filters/images/images-filter.h
@@ -28,7 +28,7 @@ Q_OBJECT
 public:
     ImagesFilter (QObject* parent, const QVariantList &);
     virtual ~ImagesFilter();
-    virtual void filterMessage (KTp::Message& message);
+    virtual void filterMessage (KTp::Message &message, const KTp::MessageContext &context);
 
 private:
     class Private;
diff --git a/filters/texttospeech/tts-filter.cpp b/filters/texttospeech/tts-filter.cpp
index 134ebc9..966f4fc 100644
--- a/filters/texttospeech/tts-filter.cpp
+++ b/filters/texttospeech/tts-filter.cpp
@@ -46,8 +46,17 @@ TTSFilter::~TTSFilter()
     delete d;
 }
 
-void TTSFilter::filterIncomingMessage(KTp::Message &message)
+void TTSFilter::filterMessage(KTp::Message &message, const KTp::MessageContext &context)
 {
+    Q_UNUSED (context)
+    if (message.direction() == KTp::Message::LocalToRemote) {
+        return;
+    }
+
+    if (message.isHistory()) {
+        return;
+    }
+
     //FIXME with real name.
     d->kspeech->say(i18n("New message. %1").arg(message.mainMessagePart()), KSpeech::soHtml);
 }
diff --git a/filters/texttospeech/tts-filter.h b/filters/texttospeech/tts-filter.h
index 6da94f6..97a2552 100644
--- a/filters/texttospeech/tts-filter.h
+++ b/filters/texttospeech/tts-filter.h
@@ -28,7 +28,7 @@ Q_OBJECT
 public:
     TTSFilter(QObject *parent, const QVariantList &);
     virtual ~TTSFilter();
-    virtual void filterIncomingMessage(KTp::Message &message);
+    virtual void filterMessage(KTp::Message &message, const KTp::MessageContext &context);
 
 private:
     class Private;
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index f831e27..5146433 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -611,7 +611,7 @@ void ChatWidget::handleIncomingMessage(const Tp::ReceivedMessage &message)
         } else {
             AdiumThemeContentInfo messageInfo(AdiumThemeMessageInfo::RemoteToLocal);
 
-            KTp::Message processedMessage(KTp::MessageProcessor::instance()->processIncomingMessage(message));
+            KTp::Message processedMessage(KTp::MessageProcessor::instance()->processMessage(message, d->account, d->channel));
             messageInfo.setMessage(processedMessage.finalizedMessage());
             messageInfo.setScript(processedMessage.finalizedScript());
 
@@ -727,7 +727,7 @@ void ChatWidget::handleMessageSent(const Tp::Message &message, Tp::MessageSendin
     }
     else {
         AdiumThemeContentInfo messageInfo(AdiumThemeMessageInfo::LocalToRemote);
-        KTp::Message processedMessage(KTp::MessageProcessor::instance()->processOutgoingMessage(message));
+        KTp::Message processedMessage(KTp::MessageProcessor::instance()->processMessage(message, d->account, d->channel));
         messageInfo.setMessage(processedMessage.finalizedMessage());
         messageInfo.setScript(processedMessage.finalizedScript());
 
diff --git a/lib/logmanager.cpp b/lib/logmanager.cpp
index e4ae2b2..a80bf1e 100644
--- a/lib/logmanager.cpp
+++ b/lib/logmanager.cpp
@@ -181,8 +181,7 @@ void LogManager::onEventsFinished(Tpl::PendingOperation *po)
 
         AdiumThemeContentInfo message(type);
 
-        KTp::Message processedEvent(type == AdiumThemeMessageInfo::HistoryLocalToRemote ? KTp::MessageProcessor::instance()->processOutgoingMessage(event)
-                                                                                        : KTp::MessageProcessor::instance()->processIncomingMessage(event));
+        KTp::Message processedEvent = KTp::MessageProcessor::instance()->processMessage(event, m_account, m_textChannel);
 
         message.setMessage(processedEvent.finalizedMessage());
         message.setScript(processedEvent.finalizedScript());
diff --git a/logviewer/message-view.cpp b/logviewer/message-view.cpp
index 1a970bd..44e0e3d 100644
--- a/logviewer/message-view.cpp
+++ b/logviewer/message-view.cpp
@@ -135,7 +135,7 @@ void MessageView::processStoredEvents()
         }
 
         AdiumThemeContentInfo message(type);
-        message.setMessage(KTp::MessageProcessor::instance()->processIncomingMessage(textEvent).finalizedMessage());
+        message.setMessage(KTp::MessageProcessor::instance()->processMessage(textEvent, m_account, Tp::TextChannelPtr()).finalizedMessage());
         message.setService(m_account->serviceName());
         message.setSenderDisplayName(textEvent->sender()->alias());
         message.setSenderScreenName(textEvent->sender()->identifier());

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list