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


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

The following commit has been merged in the master branch:
commit bf4b5ff289bba6e6e252a860d50002707c048c81
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Thu Jul 25 22:57:55 2013 +0200

    Make TelepathyLoggerQt an optional dependency
    
    REVIEW: 111682
---
 CMakeLists.txt            | 11 ++++++++---
 KTp/CMakeLists.txt        |  8 +++++++-
 KTp/message-processor.cpp |  3 ++-
 KTp/message-processor.h   |  5 +++++
 KTp/message.cpp           |  4 ++++
 KTp/message.h             |  4 ++++
 KTp/outgoing-message.cpp  |  2 --
 7 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index db298f2..9658c7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ set (KTP_MESSAGE_FILTER_FRAMEWORK_VERSION "4")
 
 find_package (KDE4 REQUIRED)
 find_package (TelepathyQt4 0.9.2.1 REQUIRED)
-find_package (TelepathyLoggerQt4 REQUIRED)
+find_package (TelepathyLoggerQt4 QUIET)
 find_package (KPeople QUIET)
 
 # set some default settings
@@ -25,11 +25,11 @@ include (KDE4Defaults)
 include (MacroLibrary)
 
 macro_log_feature(KPEOPLE_FOUND "KPeople" "Support for KDE Contact Aggregation" "https://projects.kde.org/libkpeople" FALSE "" "")
+macro_log_feature(TELEPATHY_LOGGER_QT4_FOUND "TelepatyLoggerQt4" "Qt bindings for TelepathyLogger. This is needed to provide access to chat logs. HIGHLY recommended" "http://projects.kde.org/telepathy-logger-qt" FALSE "" "")
 macro_display_feature_log()
 
 
 add_definitions (${KDE4_DEFINITIONS}
-                 ${TELEPATHY_LOGGER_QT4_DEFINITIONS}
                  -DQT_NO_CAST_FROM_ASCII
                  -DQT_NO_KEYWORDS
 )
@@ -38,9 +38,14 @@ include_directories (${KDE4_INCLUDES}
                      ${CMAKE_CURRENT_BINARY_DIR}
                      ${CMAKE_CURRENT_SOURCE_DIR}
                      ${TELEPATHY_QT4_INCLUDE_DIR}
-                     ${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS}
 )
 
+if (TELEPATHY_LOGGER_QT4_FOUND)
+    add_definitions(${TELEPATHY_LOGGER_QT4_DEFINITIONS}
+                    -DHAVE_TPLOGGERQT)
+    include_directories(${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS})
+endif (TELEPATHY_LOGGER_QT4_FOUND)
+
 if (KPEOPLE_FOUND)
     add_definitions(-DHAVE_KPEOPLE)
     add_subdirectory(kpeople)
diff --git a/KTp/CMakeLists.txt b/KTp/CMakeLists.txt
index 203ed99..b514418 100644
--- a/KTp/CMakeLists.txt
+++ b/KTp/CMakeLists.txt
@@ -66,10 +66,16 @@ set (ktp_private_LIBS
                        ${KDE4_KDECORE_LIBS}
                        ${KDE4_KIO_LIBS}
                        ${TELEPATHY_QT4_LIBRARIES}
-                       ${TELEPATHY_LOGGER_QT4_LIBRARIES}
                        ${KDE4_KDEUI_LIBS}
 )
 
+if (TELEPATHY_LOGGER_QT4_FOUND)
+    set (ktp_private_LIBS
+         ${ktp_private_LIBS}
+         ${TELEPATHY_LOGGER_QT4_LIBRARIES}
+         )
+endif (TELEPATHY_LOGGER_QT4_FOUND)
+
 if (KPEOPLE_FOUND)
     #this is temporary whilst im-persons-data-source still has it's own query
     find_package (NepomukCore REQUIRED)
diff --git a/KTp/message-processor.cpp b/KTp/message-processor.cpp
index ea2699d..e045d7b 100644
--- a/KTp/message-processor.cpp
+++ b/KTp/message-processor.cpp
@@ -191,12 +191,13 @@ KTp::Message KTp::MessageProcessor::processIncomingMessage(const Tp::ReceivedMes
     return processIncomingMessage(KTp::Message(message, context), context);
 }
 
+#ifdef HAVE_TPLOGGERQT
 KTp::Message KTp::MessageProcessor::processIncomingMessage(const Tpl::TextEventPtr &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel)
 {
     KTp::MessageContext context(account, channel);
     return processIncomingMessage(KTp::Message(message, context), context);
 }
-
+#endif
 
 KTp::Message MessageProcessor::processIncomingMessage(KTp::Message message, const KTp::MessageContext &context)
 {
diff --git a/KTp/message-processor.h b/KTp/message-processor.h
index 42f8be6..8ce92b2 100644
--- a/KTp/message-processor.h
+++ b/KTp/message-processor.h
@@ -29,7 +29,10 @@
 
 #include <KTp/ktp-export.h>
 #include <KTp/abstract-message-filter.h>
+
+#ifdef HAVE_TPLOGGERQT
 #include <TelepathyLoggerQt4/Types>
+#endif
 
 namespace Tp
 {
@@ -58,7 +61,9 @@ class KTP_EXPORT MessageProcessor : public QObject
     //text-ui will call this somewhere in handleIncommingMessage just before displaying it
     KTp::Message processIncomingMessage(const Tp::Message &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
     KTp::Message processIncomingMessage(const Tp::ReceivedMessage &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
+#ifdef HAVE_TPLOGGERQT
     KTp::Message processIncomingMessage(const Tpl::TextEventPtr &message, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
+#endif
 
     KTp::OutgoingMessage processOutgoingMessage(const QString &messageText, const Tp::AccountPtr &account, const Tp::TextChannelPtr &channel);
 
diff --git a/KTp/message.cpp b/KTp/message.cpp
index fa9c608..36ea234 100644
--- a/KTp/message.cpp
+++ b/KTp/message.cpp
@@ -25,7 +25,9 @@
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/Connection>
 
+#ifdef HAVE_TPLOGGERQT
 #include <TelepathyLoggerQt4/Entity>
+#endif
 
 using namespace KTp;
 
@@ -101,6 +103,7 @@ Message::Message(const Tp::ReceivedMessage &original, const KTp::MessageContext
     }
 }
 
+#ifdef HAVE_TPLOGGERQT
 Message::Message(const Tpl::TextEventPtr &original, const KTp::MessageContext &context) :
     d(new Private)
 {
@@ -128,6 +131,7 @@ Message::Message(const Tpl::TextEventPtr &original, const KTp::MessageContext &c
 
     setMainMessagePart(original->message());
 }
+#endif
 
 Message::Message(const QString &messageText, const MessageContext &context) :
     d(new Private)
diff --git a/KTp/message.h b/KTp/message.h
index 982b8cf..2953616 100644
--- a/KTp/message.h
+++ b/KTp/message.h
@@ -22,8 +22,10 @@
 
 #include <TelepathyQt/Message>
 
+#ifdef HAVE_TPLOGGERQT
 #include <TelepathyLoggerQt4/Types>
 #include <TelepathyLoggerQt4/TextEvent>
+#endif
 
 #include <KTp/ktp-export.h>
 #include <KTp/types.h>
@@ -159,7 +161,9 @@ public:
 protected:
     Message(const Tp::Message &original, const KTp::MessageContext &context);
     Message(const Tp::ReceivedMessage &original, const KTp::MessageContext &context);
+#ifdef HAVE_TPLOGGERQT
     Message(const Tpl::TextEventPtr &original, const KTp::MessageContext &context);
+#endif
     explicit Message(const QString &messageText, const KTp::MessageContext &context);
 
 
diff --git a/KTp/outgoing-message.cpp b/KTp/outgoing-message.cpp
index 055017e..0dcb106 100644
--- a/KTp/outgoing-message.cpp
+++ b/KTp/outgoing-message.cpp
@@ -25,8 +25,6 @@
 #include <TelepathyQt/ContactManager>
 #include <TelepathyQt/Connection>
 
-#include <TelepathyLoggerQt4/Entity>
-
 using namespace KTp;
 
 class OutgoingMessage::Private : public QSharedData {

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list