[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:04:39 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=6825e16
The following commit has been merged in the master branch:
commit 6825e166799cc978b5567d12c553a2c8c5a751d9
Author: Dan Vrátil <dvratil at redhat.com>
Date: Thu Jul 25 23:03:48 2013 +0200
Make TelepathyLoggerQt an optional dependency
REVIEW: 111685
---
CMakeLists.txt | 12 +++++++++---
src/kcm-telepathy-accounts.cpp | 17 +++++++++++++++--
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb4e50d..d10706e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,9 +11,12 @@ set(IS_KTP_INTERNAL_MODULE TRUE)
set(KDE_MIN_VERSION "4.7.0")
find_package (KDE4 REQUIRED)
find_package (TelepathyQt4 0.8.9 REQUIRED)
-find_package (TelepathyLoggerQt4 REQUIRED)
+find_package (TelepathyLoggerQt4 QUIET)
find_package (KTp REQUIRED)
+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()
+
# set some default settings
include (KDE4Defaults)
@@ -23,16 +26,19 @@ include (MacroLibrary)
add_definitions (${KDE4_DEFINITIONS}
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_KEYWORDS
- ${TELEPATHY_LOGGER_QT4_DEFINITIONS}
)
include_directories (${KDE4_INCLUDES}
${TELEPATHY_QT4_INCLUDE_DIR}
- ${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS}
${KTP_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
)
+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)
+
add_subdirectory (src)
add_subdirectory (data)
add_subdirectory (plugins)
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index 59e3d21..d17efae 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -60,10 +60,11 @@
#include <TelepathyQt/PendingComposite>
#include <TelepathyQt/ConnectionManager>
+#ifdef HAVE_TPLOGGERQT
#include <TelepathyLoggerQt4/LogManager>
#include <TelepathyLoggerQt4/Init>
#include <TelepathyLoggerQt4/PendingOperation>
-
+#endif
K_PLUGIN_FACTORY(KCMTelepathyAccountsFactory, registerPlugin<KCMTelepathyAccounts>();)
K_EXPORT_PLUGIN(KCMTelepathyAccountsFactory("kcm_ktp_accounts", "kcm_ktp_accounts"))
@@ -90,7 +91,9 @@ KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList&
// The first thing we must do is register Telepathy DBus Types.
Tp::registerTypes();
+#ifdef HAVE_TPLOGGERQT
Tpl::init();
+#endif
// Start setting up the Telepathy AccountManager.
Tp::AccountFactoryPtr accountFactory = Tp::AccountFactory::create(QDBusConnection::sessionBus(),
@@ -413,8 +416,16 @@ void KCMTelepathyAccounts::onRemoveAccountClicked()
dialog->setWindowTitle(i18n("Remove Account"));
dialog->setButtonGuiItem(KDialog::Yes, KGuiItem(i18n("Remove Account"), QLatin1String("edit-delete")));
bool removeLogs = false;
+
+ // Don't show the 'Remove logs' checkbox when we don't support TpLogger
+#ifdef HAVE_TPLOGGERQT
+ const QString msg = i18n("Remove conversations logs");
+#else
+ const QString msg;
+#endif
+
if (KMessageBox::createKMessageBox(dialog, QMessageBox::Warning, i18n("Are you sure you want to remove the account \"%1\"?", accountName),
- QStringList(), i18n("Remove conversations logs"), &removeLogs,
+ QStringList(), msg , &removeLogs,
KMessageBox::Dangerous | KMessageBox::Notify) == KDialog::Yes) {
Tp::AccountPtr account = index.data(KTp::AccountsListModel::AccountRole).value<Tp::AccountPtr>();
@@ -422,10 +433,12 @@ void KCMTelepathyAccounts::onRemoveAccountClicked()
return;
}
+#ifdef HAVE_TPLOGGERQT
if (removeLogs) {
Tpl::LogManagerPtr logManager = Tpl::LogManager::instance();
logManager->clearAccountHistory(account);
}
+#endif
QList<Tp::PendingOperation*> ops;
ops.append(KTp::WalletUtils::removeAccountPassword(account));
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list