[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:35 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=18fd173
The following commit has been merged in the master branch:
commit 18fd1738a3eff0e8e94266b0653d22f554b68851
Author: Aleix Pol <aleixpol at kde.org>
Date: Mon Dec 15 14:53:06 2014 +0100
Drop KDELibs4Support dependency from KTp::Logger
It was just using KDebug, ported to QLoggingCategory
---
KTp/Logger/CMakeLists.txt | 3 ++-
KTp/{Models => Logger}/debug.cpp | 2 +-
KTp/{OTR => Logger}/debug.h | 6 +++---
KTp/Logger/log-manager.cpp | 8 ++++----
KTp/Logger/pending-logger-dates-impl.cpp | 4 ++--
KTp/Logger/pending-logger-entities-impl.cpp | 4 ++--
KTp/Logger/pending-logger-logs-impl.cpp | 4 ++--
KTp/Logger/pending-logger-search-impl.cpp | 4 ++--
KTp/Logger/plugins/tplogger/pending-tp-logger-logs.cpp | 4 ++--
KTp/Logger/scrollback-manager.cpp | 10 +++++-----
10 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/KTp/Logger/CMakeLists.txt b/KTp/Logger/CMakeLists.txt
index 78a8da0..d1d54e9 100644
--- a/KTp/Logger/CMakeLists.txt
+++ b/KTp/Logger/CMakeLists.txt
@@ -16,6 +16,7 @@ set (ktp_logger_private_SRCS
pending-logger-search.cpp
pending-logger-search-impl.cpp
scrollback-manager.cpp
+ debug.cpp
)
set (ktp_logger_private_HDRS
@@ -51,7 +52,7 @@ target_link_libraries (KTpLogger
KTp::CommonInternals
${TELEPATHY_LOGGER_LIBRARIES}
PRIVATE
- KF5::KDELibs4Support
+ KF5::Service
)
install (TARGETS KTpLogger
diff --git a/KTp/Models/debug.cpp b/KTp/Logger/debug.cpp
similarity index 94%
copy from KTp/Models/debug.cpp
copy to KTp/Logger/debug.cpp
index 273c714..412f61e 100644
--- a/KTp/Models/debug.cpp
+++ b/KTp/Logger/debug.cpp
@@ -17,4 +17,4 @@
*/
#include "debug.h"
-Q_LOGGING_CATEGORY(KTP_MODELS, "ktp-models")
+Q_LOGGING_CATEGORY(KTP_LOGGER, "ktp-logger")
diff --git a/KTp/OTR/debug.h b/KTp/Logger/debug.h
similarity index 91%
copy from KTp/OTR/debug.h
copy to KTp/Logger/debug.h
index 379cc84..cd25b7e 100644
--- a/KTp/OTR/debug.h
+++ b/KTp/Logger/debug.h
@@ -17,13 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef KTP_OTR_DEBUG_H
-#define KTP_OTR_DEBUG_H
+#ifndef KTP_LOGGER_DEBUG_H
+#define KTP_LOGGER_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_OTR)
+Q_DECLARE_LOGGING_CATEGORY(KTP_LOGGER)
#endif
diff --git a/KTp/Logger/log-manager.cpp b/KTp/Logger/log-manager.cpp
index dc399d9..5deb357 100644
--- a/KTp/Logger/log-manager.cpp
+++ b/KTp/Logger/log-manager.cpp
@@ -31,7 +31,7 @@
#include <KServiceTypeTrader>
#include <KPluginInfo>
-#include <KDebug>
+#include "debug.h"
using namespace KTp;
@@ -50,15 +50,15 @@ void LogManager::Private::loadPlugins()
const KService::Ptr service = pluginInfo.service();
KPluginFactory *factory = KPluginLoader(service->library()).factory();
if (factory) {
- kDebug() << "loaded factory :" << factory;
+ qCDebug(KTP_LOGGER) << "loaded factory :" << factory;
AbstractLoggerPlugin *plugin = factory->create<AbstractLoggerPlugin>(q);
if (plugin) {
- kDebug() << "loaded logger plugin : " << plugin;
+ qCDebug(KTP_LOGGER) << "loaded logger plugin : " << plugin;
plugins << plugin;
}
} else {
- kError() << "error loading plugin :" << service->library();
+ qCWarning(KTP_LOGGER) << "error loading plugin :" << service->library();
}
}
}
diff --git a/KTp/Logger/pending-logger-dates-impl.cpp b/KTp/Logger/pending-logger-dates-impl.cpp
index 8aaf783..22cf035 100644
--- a/KTp/Logger/pending-logger-dates-impl.cpp
+++ b/KTp/Logger/pending-logger-dates-impl.cpp
@@ -19,7 +19,7 @@
#include "pending-logger-dates-impl.h"
#include "abstract-logger-plugin.h"
-#include <KDebug>
+#include "debug.h"
PendingLoggerDatesImpl::PendingLoggerDatesImpl(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
@@ -61,7 +61,7 @@ void PendingLoggerDatesImpl::operationFinished(KTp::PendingLoggerOperation *op)
const QList<QDate> newDates = operation->dates();
QList<QDate> existingDates = dates();
- kDebug() << "Plugin" << op->parent() << "returned" << newDates.count() << "dates";
+ qCDebug(KTP_LOGGER) << "Plugin" << op->parent() << "returned" << newDates.count() << "dates";
Q_FOREACH (const QDate &date, newDates) {
if (!existingDates.contains(date)) {
existingDates << date;
diff --git a/KTp/Logger/pending-logger-entities-impl.cpp b/KTp/Logger/pending-logger-entities-impl.cpp
index 14502ea..4dfcf8e 100644
--- a/KTp/Logger/pending-logger-entities-impl.cpp
+++ b/KTp/Logger/pending-logger-entities-impl.cpp
@@ -19,7 +19,7 @@
#include "pending-logger-entities-impl.h"
#include "abstract-logger-plugin.h"
-#include <KDebug>
+#include "debug.h"
PendingLoggerEntitiesImpl::PendingLoggerEntitiesImpl(const Tp::AccountPtr &account,
QObject* parent):
@@ -59,7 +59,7 @@ void PendingLoggerEntitiesImpl::operationFinished(KTp::PendingLoggerOperation* o
Q_ASSERT(operation);
const QList<KTp::LogEntity> newEntities = operation->entities();
- kDebug() << "Plugin" << op->parent() << "returned" << newEntities.count() << "entities";
+ qCDebug(KTP_LOGGER) << "Plugin" << op->parent() << "returned" << newEntities.count() << "entities";
Q_FOREACH (const KTp::LogEntity &entity, newEntities) {
if (!entities().contains(entity)) {
appendEntity(entity);
diff --git a/KTp/Logger/pending-logger-logs-impl.cpp b/KTp/Logger/pending-logger-logs-impl.cpp
index aa4a19a..b2b0b1e 100644
--- a/KTp/Logger/pending-logger-logs-impl.cpp
+++ b/KTp/Logger/pending-logger-logs-impl.cpp
@@ -19,7 +19,7 @@
#include "pending-logger-logs-impl.h"
#include "abstract-logger-plugin.h"
-#include <KDebug>
+#include "debug.h"
PendingLoggerLogsImpl::PendingLoggerLogsImpl(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
@@ -62,7 +62,7 @@ void PendingLoggerLogsImpl::operationFinished(KTp::PendingLoggerOperation *op)
Q_ASSERT(operation);
const QList<KTp::LogMessage> newLogs = operation->logs();
- kDebug() << "Plugin" << op->parent() << "returned" << newLogs.count() << "logs";
+ qCDebug(KTP_LOGGER) << "Plugin" << op->parent() << "returned" << newLogs.count() << "logs";
// FIXME: Maybe handle duplicates?
appendLogs(newLogs);
diff --git a/KTp/Logger/pending-logger-search-impl.cpp b/KTp/Logger/pending-logger-search-impl.cpp
index 0a175d4..e07ffb8 100644
--- a/KTp/Logger/pending-logger-search-impl.cpp
+++ b/KTp/Logger/pending-logger-search-impl.cpp
@@ -20,7 +20,7 @@
#include "pending-logger-search-impl.h"
#include "abstract-logger-plugin.h"
-#include <KDebug>
+#include "debug.h"
PendingLoggerSearchImpl::PendingLoggerSearchImpl(const QString& term, QObject* parent):
PendingLoggerSearch(term, parent)
@@ -55,7 +55,7 @@ void PendingLoggerSearchImpl::operationFinished(KTp::PendingLoggerOperation *op)
Q_ASSERT(operation);
const QList<KTp::LogSearchHit> hits = operation->searchHits();
- kDebug() << "Plugin" << op->parent() << "returned" << hits.count() << "results";
+ qCDebug(KTP_LOGGER) << "Plugin" << op->parent() << "returned" << hits.count() << "results";
appendSearchHits(hits);
if (mRunningOps.isEmpty()) {
diff --git a/KTp/Logger/plugins/tplogger/pending-tp-logger-logs.cpp b/KTp/Logger/plugins/tplogger/pending-tp-logger-logs.cpp
index 71c345d..69e3426 100644
--- a/KTp/Logger/plugins/tplogger/pending-tp-logger-logs.cpp
+++ b/KTp/Logger/plugins/tplogger/pending-tp-logger-logs.cpp
@@ -28,7 +28,7 @@
#include <KTp/message-processor.h>
-#include <KDebug>
+#include "Logger/debug.h"
PendingTpLoggerLogs::PendingTpLoggerLogs(const Tp::AccountPtr &account,
const KTp::LogEntity &entity,
@@ -63,7 +63,7 @@ void PendingTpLoggerLogs::logsRetrieved(Tpl::PendingOperation *op)
Q_FOREACH (const Tpl::EventPtr &event, events) {
const Tpl::TextEventPtr textEvent = event.dynamicCast<Tpl::TextEvent>();
if (textEvent.isNull()) {
- kDebug() << "Received a null TextEvent!";
+ qWarning() << "Received a null TextEvent!";
continue;
}
diff --git a/KTp/Logger/scrollback-manager.cpp b/KTp/Logger/scrollback-manager.cpp
index ae8a89a..d9680ae 100644
--- a/KTp/Logger/scrollback-manager.cpp
+++ b/KTp/Logger/scrollback-manager.cpp
@@ -26,7 +26,7 @@
#include "pending-logger-dates.h"
#include "pending-logger-logs.h"
-#include <KDebug>
+#include "debug.h"
#include <TelepathyQt/Types>
#include <TelepathyQt/AvatarData>
@@ -122,7 +122,7 @@ void ScrollbackManager::onDatesFinished(KTp::PendingLoggerOperation* po)
{
KTp::PendingLoggerDates *datesOp = qobject_cast<KTp::PendingLoggerDates*>(po);
if (datesOp->hasError()) {
- kWarning() << "Failed to fetch dates:" << datesOp->error();
+ qCWarning(KTP_LOGGER) << "Failed to fetch dates:" << datesOp->error();
Q_EMIT fetched(QList<KTp::Message>());
return;
}
@@ -144,7 +144,7 @@ void ScrollbackManager::onEventsFinished(KTp::PendingLoggerOperation *op)
{
KTp::PendingLoggerLogs *logsOp = qobject_cast<KTp::PendingLoggerLogs*>(op);
if (logsOp->hasError()) {
- kWarning() << "Failed to fetch events:" << logsOp->error();
+ qCWarning(KTP_LOGGER) << "Failed to fetch events:" << logsOp->error();
Q_EMIT fetched(QList<KTp::Message>());
return;
}
@@ -155,7 +155,7 @@ void ScrollbackManager::onEventsFinished(KTp::PendingLoggerOperation *op)
queuedMessageTokens.append(message.messageToken());
}
}
- kDebug() << "queuedMessageTokens" << queuedMessageTokens;
+ qCDebug(KTP_LOGGER) << "queuedMessageTokens" << queuedMessageTokens;
// get last n (d->fetchLast) messages that are not queued
const QList<KTp::LogMessage> allMessages = logsOp->logs();
@@ -170,6 +170,6 @@ void ScrollbackManager::onEventsFinished(KTp::PendingLoggerOperation *op)
messages << KTp::MessageProcessor::instance()->processIncomingMessage(message, ctx);
}
- kDebug() << "emit all messages" << messages.count();
+ qCDebug(KTP_LOGGER) << "emit all messages" << messages.count();
Q_EMIT fetched(messages);
}
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list