[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:13:47 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=7bfc882
The following commit has been merged in the master branch:
commit 7bfc8825f631669f43249d1ca5152b08d8d47964
Author: Dan Vrátil <dvratil at redhat.com>
Date: Mon Aug 26 15:48:16 2013 +0200
Port contact list to KTp Logger
---
CMakeLists.txt | 17 +----------------
cmake/modules/FindKTp.cmake | 2 ++
contact-list-widget.cpp | 2 --
context-menu.cpp | 23 +++++------------------
context-menu.h | 7 -------
5 files changed, 8 insertions(+), 43 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1eac9f2..d2e4649 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,11 +12,9 @@ set(KDE_MIN_VERSION "4.4.75")
find_package (KDE4 4.4.75 REQUIRED)
find_package (TelepathyQt4 0.9.3 REQUIRED)
find_package (KTp REQUIRED)
-find_package (TelepathyLoggerQt4 0.5.60 QUIET)
find_package (KPeople QUIET)
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()
if (KPEOPLE_FOUND)
@@ -24,12 +22,6 @@ if (KPEOPLE_FOUND)
include_directories(${KPEOPLE_INCLUDES})
endif (KPEOPLE_FOUND)
-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)
-
-
include (KDE4Defaults)
include (MacroLibrary)
@@ -73,6 +65,7 @@ set (ktp_contactlist_LIBS
${KTP_LIBRARIES}
${KTP_MODELS_LIBRARIES}
${KTP_WIDGETS_LIBRARIES}
+ ${KTP_LOGGER_LIBRARIES}
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
${KDE4_KCMUTILS_LIBS}
@@ -88,14 +81,6 @@ set (ktp_contactlist_LIBS
)
endif(KPEOPLE_FOUND)
-if (TELEPATHY_LOGGER_QT4_FOUND)
-set(ktp_contactlist_LIBS
- ${ktp_contactlist_LIBS}
- ${TELEPATHY_LOGGER_QT4_LIBRARIES}
-)
-endif (TELEPATHY_LOGGER_QT4_FOUND)
-
-
configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
kde4_add_ui_files (ktp_contactlist_SRCS
diff --git a/cmake/modules/FindKTp.cmake b/cmake/modules/FindKTp.cmake
index 8facd12..4c6f7a6 100644
--- a/cmake/modules/FindKTp.cmake
+++ b/cmake/modules/FindKTp.cmake
@@ -4,6 +4,7 @@
# KTP_LIBRARIES
# KTP_MODELS_LIBRARIES
# KTP_WIDGETS_LIBRARIES
+# KTP_LOGGER_LIBRARIES
# Copyright (c) 2011, Dario Freddi <drf at kde.org>
#
@@ -28,6 +29,7 @@ find_path(KTP_INCLUDE_DIR
find_library(KTP_LIBRARIES NAMES ktpcommoninternalsprivate )
find_library(KTP_MODELS_LIBRARIES NAMES ktpmodelsprivate )
find_library(KTP_WIDGETS_LIBRARIES NAMES ktpwidgetsprivate )
+find_library(KTP_LOGGER_LIBRARIES NAMES ktploggerprivate )
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KTp DEFAULT_MSG
diff --git a/contact-list-widget.cpp b/contact-list-widget.cpp
index d5eb643..98119a5 100644
--- a/contact-list-widget.cpp
+++ b/contact-list-widget.cpp
@@ -320,7 +320,6 @@ void ContactListWidget::addOverlayButtons()
d->delegate->installOverlay(videoOverlay);
d->delegate->installOverlay(fileOverlay);
-#ifdef HAVE_TPLOGGERQT
LogViewerOverlay *logViewerOverlay = new LogViewerOverlay(d->delegate);
d->delegate->installOverlay(logViewerOverlay);
connect(logViewerOverlay, SIGNAL(activated(Tp::AccountPtr,Tp::ContactPtr)),
@@ -328,7 +327,6 @@ void ContactListWidget::addOverlayButtons()
connect(this, SIGNAL(enableOverlays(bool)),
logViewerOverlay, SLOT(setActive(bool)));
-#endif
d->delegate->setViewOnAllOverlays(this);
d->delegate->setAllOverlaysActive(true);
diff --git a/context-menu.cpp b/context-menu.cpp
index f934b4a..d3d84da 100644
--- a/context-menu.cpp
+++ b/context-menu.cpp
@@ -35,17 +35,13 @@
#include <KTp/contact-info-dialog.h>
#include <KTp/types.h>
#include <KTp/Models/contacts-model.h>
+#include <KTp/Logger/log-manager.h>
+#include <KTp/Logger/log-entity.h>
#include <TelepathyQt/ContactManager>
#include <TelepathyQt/Account>
#include <TelepathyQt/PendingOperation>
-#ifdef HAVE_TPLOGGERQT
-#include <TelepathyLoggerQt4/Entity>
-#include <TelepathyLoggerQt4/LogManager>
-#include <TelepathyLoggerQt4/Init>
-#endif
-
#ifdef HAVE_KPEOPLE
#include <kpeople/personpluginmanager.h>
#include <kpeople/widgets/persondetailsdialog.h>
@@ -59,11 +55,6 @@ ContextMenu::ContextMenu(ContactListWidget *mainWidget)
: QObject(mainWidget)
{
m_mainWidget = mainWidget;
-
-#ifdef HAVE_TPLOGGERQT
- Tpl::init();
- m_logManager = Tpl::LogManager::instance();
-#endif
}
@@ -75,9 +66,7 @@ ContextMenu::~ContextMenu()
void ContextMenu::setAccountManager(const Tp::AccountManagerPtr &accountManager)
{
m_accountManager = accountManager;
-#ifdef HAVE_TPLOGGERQT
- m_logManager->setAccountManagerPtr(accountManager);
-#endif
+ KTp::LogManager::instance()->setAccountManager(accountManager);
}
KMenu* ContextMenu::contactContextMenu(const QModelIndex &index)
@@ -172,13 +161,11 @@ KMenu* ContextMenu::contactContextMenu(const QModelIndex &index)
connect(action, SIGNAL(triggered(bool)),
SLOT(onOpenLogViewerTriggered()));
-#ifdef HAVE_TPLOGGERQT
- Tpl::EntityPtr entity = Tpl::Entity::create(contact, Tpl::EntityTypeContact);
- if (m_logManager->exists(account, entity, Tpl::EventTypeMaskText)) {
+ KTp::LogEntity entity(Tp::HandleTypeContact, contact->id());
+ if (KTp::LogManager::instance()->logsExist(account, entity)) {
action->setEnabled(true);
}
#endif
-#endif
menu->addSeparator();
action = menu->addAction(KIcon("dialog-information"), i18n("Configure Notifications..."));
diff --git a/context-menu.h b/context-menu.h
index c8618a1..bec4e55 100644
--- a/context-menu.h
+++ b/context-menu.h
@@ -26,10 +26,6 @@
#include <TelepathyQt/Types>
-#ifdef HAVE_TPLOGGERQT
-#include <TelepathyLoggerQt4/LogManager>
-#endif
-
#include "contact-list-widget.h"
class AccountsModel;
@@ -72,9 +68,6 @@ private:
ContactListWidget *m_mainWidget;
QPersistentModelIndex m_currentIndex;
Tp::AccountManagerPtr m_accountManager;
-#ifdef HAVE_TPLOGGERQT
- Tpl::LogManagerPtr m_logManager;
-#endif
};
#endif // CONTEXT_MENU_H
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list