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


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

The following commit has been merged in the master branch:
commit fdba24565ec94bfa5e5bfbc6fd6b3ef97a66bc86
Author: Aleix Pol <aleixpol at kde.org>
Date:   Mon Dec 15 13:21:38 2014 +0100

    Drop KDELibs4Support from KTp::OTR
---
 KTp/OTR/CMakeLists.txt        |  4 ++--
 KTp/OTR/channel-adapter.cpp   | 31 +++++++++++--------------------
 KTp/{Models => OTR}/debug.cpp |  2 +-
 KTp/{Models => OTR}/debug.h   |  6 +++---
 4 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/KTp/OTR/CMakeLists.txt b/KTp/OTR/CMakeLists.txt
index 9f0c6cb..65bbe14 100644
--- a/KTp/OTR/CMakeLists.txt
+++ b/KTp/OTR/CMakeLists.txt
@@ -15,7 +15,8 @@ add_library (KTpOTR SHARED
     channel-proxy-interface.cpp
     proxy-service-interface.cpp
     types.cpp
-    utils.cpp)
+    utils.cpp
+    debug.cpp)
 add_library(KTp::OTR ALIAS KTpOTR)
 
 set_target_properties(KTpOTR PROPERTIES
@@ -29,7 +30,6 @@ target_link_libraries (KTpOTR
                         PUBLIC
                             ${TELEPATHY_QT5_LIBRARIES}
                         PRIVATE
-                            KF5::KDELibs4Support
                             KF5::I18n
 )
 target_include_directories(KTpOTR PUBLIC ${TELEPATHY_QT5_INCLUDE_DIR}) # TODO: Remove when TelepathyQt exports include paths properly
diff --git a/KTp/OTR/channel-adapter.cpp b/KTp/OTR/channel-adapter.cpp
index 344a43f..24bd1eb 100644
--- a/KTp/OTR/channel-adapter.cpp
+++ b/KTp/OTR/channel-adapter.cpp
@@ -21,7 +21,7 @@
 #include "utils.h"
 #include "constants.h"
 
-#include <KDebug>
+#include <debug.h>
 
 #include <TelepathyQt/SharedPtr>
 #include <TelepathyQt/ReceivedMessage>
@@ -123,18 +123,18 @@ void ChannelAdapter::setChannel(const Tp::TextChannelPtr &textChannel)
     d->otrProxy = OTRProxyPtr(new KTp::Client::ChannelProxyInterfaceOTRInterface(KTP_PROXY_BUS_NAME, otrProxyPath, this));
 
     if(!d->otrProxy->isValid()) {
-        kDebug() << "No OTR proxy available for channel: " << textChannel->objectPath();
+        qCDebug(KTP_OTR) << "No OTR proxy available for channel: " << textChannel->objectPath();
         setupTextChannel();
         return;
     }
 
-    kDebug() << "Connecting to the OTR proxy: " << d->otrProxy->path();
+    qCDebug(KTP_OTR) << "Connecting to the OTR proxy: " << d->otrProxy->path();
     QDBusPendingReply<> connectResult = d->otrProxy->ConnectProxy();
     connectResult.waitForFinished();
     if(connectResult.isValid()) {
         setupOTRChannel();
     } else {
-        kWarning() << "Could not connect to the proxy" << connectResult.error().message();
+        qCWarning(KTP_OTR) << "Could not connect to the proxy" << connectResult.error().message();
         setupTextChannel();
     }
 }
@@ -146,7 +146,6 @@ Tp::TextChannelPtr ChannelAdapter::textChannel()
 
 void ChannelAdapter::setupTextChannel()
 {
-    kDebug();
     connect(d->textChannel.data(), SIGNAL(messageReceived(Tp::ReceivedMessage)),
             SIGNAL(messageReceived(Tp::ReceivedMessage)));
     connect(d->textChannel.data(), SIGNAL(pendingMessageRemoved(Tp::ReceivedMessage)),
@@ -157,7 +156,6 @@ void ChannelAdapter::setupTextChannel()
 
 void ChannelAdapter::setupOTRChannel()
 {
-    kDebug();
     d->otrConnected = true;
     d->trustLevel = KTp::OTRTrustLevelNotPrivate;
 
@@ -203,7 +201,7 @@ KTp::OTRTrustLevel ChannelAdapter::otrTrustLevel() const
 void ChannelAdapter::onTrustLevelPropertyGet(Tp::PendingOperation *op)
 {
     if(op->isError()) {
-        kWarning() << "Could not get property: TrustLevel";
+        qCWarning(KTP_OTR) << "Could not get property: TrustLevel";
         return;
     }
     // we must have received trust level changed signal before
@@ -222,13 +220,12 @@ bool ChannelAdapter::isOTRsuppored() const
 
 void ChannelAdapter::initializeOTR()
 {
-    kDebug() << "Initializing OTR session";
+    qCDebug(KTP_OTR) << "Initializing OTR session";
     d->otrProxy->Initialize();
 }
 
 void ChannelAdapter::stopOTR()
 {
-    kDebug();
     d->otrProxy->Stop();
 }
 
@@ -248,7 +245,6 @@ void ChannelAdapter::acknowledge(const QList<Tp::ReceivedMessage> &messages)
         return;
     }
 
-    kDebug();
     if(isOTRsuppored()) {
         QList<Tp::ReceivedMessage> toAck;
         QList<Tp::ReceivedMessage> eventsToRemove;
@@ -330,7 +326,6 @@ QList<Tp::ReceivedMessage> ChannelAdapter::messageQueue() const
 
 void ChannelAdapter::onMessageReceived(const Tp::MessagePartList &message)
 {
-    kDebug();
     OTRMessage recvMes(message, d->textChannel);
     if(recvMes.hasId()) {
         const int id = recvMes.getId();
@@ -338,7 +333,7 @@ void ChannelAdapter::onMessageReceived(const Tp::MessagePartList &message)
             d->messages.insert(id, recvMes);
             Q_EMIT messageReceived(recvMes);
         } else {
-            kWarning() << "Message already in the queue. Id: " << id;
+            qCWarning(KTP_OTR) << "Message already in the queue. Id: " << id;
         }
     } else if (KTp::Utils::isOtrEvent(recvMes)) {
         const int id = d->otrEvents.size();
@@ -346,13 +341,12 @@ void ChannelAdapter::onMessageReceived(const Tp::MessagePartList &message)
         d->otrEvents.insert(id, recvMes);
         Q_EMIT messageReceived(recvMes);
     } else {
-        kWarning() << "Message has not id and is not an OTR event either";
+        qCWarning(KTP_OTR) << "Message has not id and is not an OTR event either";
     }
 }
 
 void ChannelAdapter::onPendingMessagesPropertyGet(Tp::PendingOperation *op)
 {
-    kDebug();
     Tp::PendingVariant *variant = dynamic_cast<Tp::PendingVariant*>(op);
 
     if(!variant->isError()) {
@@ -363,27 +357,25 @@ void ChannelAdapter::onPendingMessagesPropertyGet(Tp::PendingOperation *op)
             onMessageReceived(message);
         }
     } else {
-        kWarning() << "Could not initialize message queue: " << variant->errorName() << " - "
+        qCWarning(KTP_OTR) << "Could not initialize message queue: " << variant->errorName() << " - "
             << variant->errorMessage();
     }
 }
 
 void ChannelAdapter::onRemoteFingerprintPropertyGet(Tp::PendingOperation *op)
 {
-    kDebug();
     Tp::PendingVariant *variant = dynamic_cast<Tp::PendingVariant*>(op);
 
     if(!variant->isError()) {
         d->remoteFp = variant->result().toString();
     } else {
-        kWarning() << "Could not get remote fingerprint: " << variant->errorName() << " - "
+        qCWarning(KTP_OTR) << "Could not get remote fingerprint: " << variant->errorName() << " - "
             << variant->errorMessage();
     }
 }
 
 void ChannelAdapter::onPendingMessagesRemoved(const Tp::UIntList &messageIDs)
 {
-    kDebug();
     Q_FOREACH(uint id, messageIDs) {
         const QMap<uint, OTRMessage>::Iterator mIt = d->messages.find(id);
         if(mIt != d->messages.end()) {
@@ -391,14 +383,13 @@ void ChannelAdapter::onPendingMessagesRemoved(const Tp::UIntList &messageIDs)
             d->messages.erase(mIt);
             Q_EMIT pendingMessageRemoved(message);
         } else {
-            kWarning() << "No message to remove with id: " << id;
+            qCWarning(KTP_OTR) << "No message to remove with id: " << id;
         }
     }
 }
 
 void ChannelAdapter::onMessageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken)
 {
-    kDebug();
     OTRMessage message(content, d->textChannel);
     Q_EMIT messageSent(message, Tp::MessageSendingFlags(flags), messageToken);
 }
diff --git a/KTp/Models/debug.cpp b/KTp/OTR/debug.cpp
similarity index 94%
copy from KTp/Models/debug.cpp
copy to KTp/OTR/debug.cpp
index 273c714..31bc9e0 100644
--- a/KTp/Models/debug.cpp
+++ b/KTp/OTR/debug.cpp
@@ -17,4 +17,4 @@
  */
 
 #include "debug.h"
-Q_LOGGING_CATEGORY(KTP_MODELS, "ktp-models")
+Q_LOGGING_CATEGORY(KTP_OTR, "ktp-otr")
diff --git a/KTp/Models/debug.h b/KTp/OTR/debug.h
similarity index 91%
copy from KTp/Models/debug.h
copy to KTp/OTR/debug.h
index fd4b67a..379cc84 100644
--- a/KTp/Models/debug.h
+++ b/KTp/OTR/debug.h
@@ -17,13 +17,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef KTP_MODELS_DEBUG_H
-#define KTP_MODELS_DEBUG_H
+#ifndef KTP_OTR_DEBUG_H
+#define KTP_OTR_DEBUG_H
 
 #include <QLoggingCategory>
 // include the QDebug here so there doesn't have to
 // be two debug includes in the files using qCDebug
 #include <QDebug>
-Q_DECLARE_LOGGING_CATEGORY(KTP_MODELS)
+Q_DECLARE_LOGGING_CATEGORY(KTP_OTR)
 
 #endif

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list