[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:25:09 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=9982e45
The following commit has been merged in the master branch:
commit 9982e4587b1ad2eb20fb9d0e44ca48c2d155b059
Author: Martin Klapetek <mklapetek at kde.org>
Date: Tue Jan 13 17:27:17 2015 +0100
[logviewer] Port kDebugs to qCDebugs
---
logviewer/config/behavior-config.cpp | 3 ---
logviewer/dates-model.cpp | 1 -
lib/ktp-debug.h => logviewer/debug.h | 13 +++++++------
logviewer/entity-filter-model.cpp | 4 ----
logviewer/entity-model.cpp | 2 --
logviewer/entity-view-delegate.cpp | 1 -
logviewer/log-viewer.cpp | 7 +++----
logviewer/main.cpp | 3 +++
logviewer/message-view.cpp | 1 -
logviewer/person-entity-merge-model.cpp | 22 +++++++++++-----------
10 files changed, 24 insertions(+), 33 deletions(-)
diff --git a/logviewer/config/behavior-config.cpp b/logviewer/config/behavior-config.cpp
index 0434a70..176175a 100644
--- a/logviewer/config/behavior-config.cpp
+++ b/logviewer/config/behavior-config.cpp
@@ -23,7 +23,6 @@
#include <KConfig>
#include <KConfigGroup>
-#include <KDebug>
K_PLUGIN_FACTORY(KCMTelepathyLogViewerBehaviorConfigFactory, registerPlugin<BehaviorConfig>();)
K_EXPORT_PLUGIN(KCMTelepathyLogViewerBehaviorConfigFactory("ktp_logviewer_behavior", "kcm_ktp_logviewer_behavior"))
@@ -60,8 +59,6 @@ void BehaviorConfig::load()
void BehaviorConfig::save()
{
- kDebug();
-
KConfig config(QLatin1String("ktelepathyrc"));
KConfigGroup group = config.group("LogViewer");
group.writeEntry(QLatin1String("SortMode"), ui->sortButtonGroup->checkedId());
diff --git a/logviewer/dates-model.cpp b/logviewer/dates-model.cpp
index e2d7ea5..de717ee 100644
--- a/logviewer/dates-model.cpp
+++ b/logviewer/dates-model.cpp
@@ -27,7 +27,6 @@
#include <KLocalizedString>
#include <klocalizeddate.h>
-#include <KDebug>
Q_DECLARE_METATYPE(Tp::AccountPtr)
diff --git a/lib/ktp-debug.h b/logviewer/debug.h
similarity index 80%
copy from lib/ktp-debug.h
copy to logviewer/debug.h
index 1f9be11..2657f1d 100644
--- a/lib/ktp-debug.h
+++ b/logviewer/debug.h
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 2015 Martin Klapetek <mklapetek at kde.org>
+/* This file is part of the KDE project
+ Copyright (C) 2014 Martin Klapetek <mklapetek at kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -17,10 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef KTP_TEXTUI_LIB_DEBUG_H
-#define KTP_TEXTUI_LIB_DEBUG_H
+#ifndef KTP_LOGVIEWER_DEBUG_H
+#define KTP_LOGVIEWER_DEBUG_H
-#include <QDebug>
#include <QLoggingCategory>
-Q_DECLARE_LOGGING_CATEGORY(KTP_TEXTUI_LIB)
+#include <QDebug>
+Q_DECLARE_LOGGING_CATEGORY(KTP_LOGVIEWER)
+
#endif
diff --git a/logviewer/entity-filter-model.cpp b/logviewer/entity-filter-model.cpp
index 58eb444..3762f80 100644
--- a/logviewer/entity-filter-model.cpp
+++ b/logviewer/entity-filter-model.cpp
@@ -24,8 +24,6 @@
#include <TelepathyQt/Types>
-#include <KDebug>
-
EntityFilterModel::EntityFilterModel(QObject *parent):
QSortFilterProxyModel(parent)
{
@@ -83,14 +81,12 @@ bool EntityFilterModel::filterAcceptsRow(int source_row, const QModelIndex &sour
/* Check if contact's account name matches */
if (entity.alias().contains(term, Qt::CaseInsensitive) && matches_filter) {
- kDebug() << entity.alias() << "matches" << term;
return matches_filter;
}
/* If there's information about contact's real name try to match it too */
if (!contact.isNull()) {
if (contact->alias().contains(term, Qt::CaseInsensitive) && matches_filter) {
- kDebug() << contact->alias() << "matches" << term;
return matches_filter;
}
}
diff --git a/logviewer/entity-model.cpp b/logviewer/entity-model.cpp
index f933aa8..28fcae9 100644
--- a/logviewer/entity-model.cpp
+++ b/logviewer/entity-model.cpp
@@ -30,8 +30,6 @@
#include <TelepathyQt/PendingOperation>
#include <TelepathyQt/PendingContacts>
-#include <KDebug>
-
class EntityModelItem
{
public:
diff --git a/logviewer/entity-view-delegate.cpp b/logviewer/entity-view-delegate.cpp
index f6c66cf..e80f4ee 100644
--- a/logviewer/entity-view-delegate.cpp
+++ b/logviewer/entity-view-delegate.cpp
@@ -26,7 +26,6 @@
#include <QFontDatabase>
#include <KIconLoader>
-#include <KDebug>
#include <TelepathyQt/Account>
diff --git a/logviewer/log-viewer.cpp b/logviewer/log-viewer.cpp
index b9e971b..abd316e 100644
--- a/logviewer/log-viewer.cpp
+++ b/logviewer/log-viewer.cpp
@@ -20,6 +20,7 @@
#include "log-viewer.h"
#include "ui_log-viewer.h"
+#include "debug.h"
#include <TelepathyQt/AccountManager>
#include <TelepathyQt/PendingReady>
@@ -38,8 +39,6 @@
#include <KLineEdit>
#include <KPixmapSequence>
#include <KMessageBox>
-
-#include <KDebug>
#include <KStandardAction>
#include <KMenu>
#include <KApplication>
@@ -455,7 +454,7 @@ void LogViewer::slotImportKopeteLogs(bool force)
bool importDone = logsConfig.readEntry(QLatin1String("InitialKopeteImportDone"), QVariant(false)).toBool();
if (!force && importDone) {
- kDebug() << "Skipping initial Kopete logs import, already done.";
+ qCDebug(KTP_LOGVIEWER) << "Skipping initial Kopete logs import, already done.";
return;
}
@@ -469,7 +468,7 @@ void LogViewer::slotImportKopeteLogs(bool force)
}
}
- kDebug() << "Initial Kopete logs import: found" << matchingAccounts.count() << "accounts to import";
+ qCDebug(KTP_LOGVIEWER) << "Initial Kopete logs import: found" << matchingAccounts.count() << "accounts to import";
if (!matchingAccounts.isEmpty()) {
LogsImportDialog *dialog = new LogsImportDialog(this);
diff --git a/logviewer/main.cpp b/logviewer/main.cpp
index 286a5f0..5af1e0f 100644
--- a/logviewer/main.cpp
+++ b/logviewer/main.cpp
@@ -23,11 +23,14 @@
#include "log-viewer.h"
#include "../ktptextui_version.h"
+#include "debug.h"
#include <TelepathyQt/AccountManager>
#include <KTp/contact-factory.h>
+Q_LOGGING_CATEGORY(KTP_LOGVIEWER, "ktp-logviewer")
+
int main(int argc, char *argv[])
{
K4AboutData aboutData("ktp-log-viewer",
diff --git a/logviewer/message-view.cpp b/logviewer/message-view.cpp
index 87a501e..eafc53e 100644
--- a/logviewer/message-view.cpp
+++ b/logviewer/message-view.cpp
@@ -23,7 +23,6 @@
#include "adium-theme-status-info.h"
#include <KTp/message-processor.h>
-#include <KDebug>
#include <KConfig>
#include <KIconLoader>
#include <KLocalizedString>
diff --git a/logviewer/person-entity-merge-model.cpp b/logviewer/person-entity-merge-model.cpp
index edfbbf2..67f45cd 100644
--- a/logviewer/person-entity-merge-model.cpp
+++ b/logviewer/person-entity-merge-model.cpp
@@ -19,6 +19,7 @@
#include "person-entity-merge-model.h"
#include "entity-model.h"
+#include "debug.h"
#include <KTp/Logger/log-entity.h>
#include <KTp/Models/contacts-model.h>
@@ -27,7 +28,6 @@
#include <TelepathyQt/Contact>
#include <TelepathyQt/ContactManager>
-#include <KDebug>
#include <KLocalizedString>
#include <KIconLoader>
@@ -123,13 +123,13 @@ PersonEntityMergeModel::ContactItem* PersonEntityMergeModel::itemForPersona(cons
ContactItem *cItem = dynamic_cast<ContactItem*>(item);
Q_ASSERT(cItem);
if (cItem->personaIndex == personsModel_personaIndex) {
- kDebug() << " Found existing persona for" << personsModel_personaIndex.data();
+ qCDebug(KTP_LOGVIEWER) << " Found existing persona for" << personsModel_personaIndex.data();
return cItem;
}
}
}
- kDebug() << " Creating a new persona for" << personsModel_personaIndex.data();
+ qCDebug(KTP_LOGVIEWER) << " Creating a new persona for" << personsModel_personaIndex.data();
ContactItem *item = new ContactItem;
item->personaIndex = personsModel_personaIndex;
@@ -163,12 +163,12 @@ PersonEntityMergeModel::GroupItem* PersonEntityMergeModel::groupForName(const QV
Q_ASSERT(group);
if (group->label == groupName) {
- kDebug() << " Found matching group" << groupName;
+ qCDebug(KTP_LOGVIEWER) << " Found matching group" << groupName;
return group;
}
}
- kDebug() << " Creating a new group" << groupName;
+ qCDebug(KTP_LOGVIEWER) << " Creating a new group" << groupName;
GroupItem *group = new GroupItem;
group->label = groupName;
addItem(group, m_rootItem);
@@ -216,7 +216,7 @@ PersonEntityMergeModel::Item* PersonEntityMergeModel::itemForIndex(const QModelI
return 0;
}
- kDebug() << index;
+ qCDebug(KTP_LOGVIEWER) << index;
Q_ASSERT(false && "Invalid index model");
return 0;
}
@@ -409,7 +409,7 @@ void PersonEntityMergeModel::sourceModelInitialized()
void PersonEntityMergeModel::initializeModel()
{
- kDebug();
+ qCDebug(KTP_LOGVIEWER);
for (int i = 0; i < m_entityModel->rowCount(QModelIndex()); ++i) {
const QModelIndex entityIndex = m_entityModel->index(i, 0);
@@ -419,7 +419,7 @@ void PersonEntityMergeModel::initializeModel()
const KTp::LogEntity entity = entityIndex.data(EntityModel::EntityRole).value<KTp::LogEntity>();
const Tp::AccountPtr account = entityIndex.data(EntityModel::AccountRole).value<Tp::AccountPtr>();
- kDebug() << "Searching for match for entity" << entity.id() << "@" << account->uniqueIdentifier();
+ qCDebug(KTP_LOGVIEWER) << "Searching for match for entity" << entity.id() << "@" << account->uniqueIdentifier();
if (KTp::kpeopleEnabled()) {
for (int j = 0; j < m_contactsModel->rowCount(); ++j) {
const QModelIndex index = m_contactsModel->index(j, 0);
@@ -427,8 +427,8 @@ void PersonEntityMergeModel::initializeModel()
for (int k = 0; k < m_contactsModel->rowCount(index); ++k) {
const QModelIndex childIndex = m_contactsModel->index(k, 0, index);
if (m_contactsModel->data(childIndex, KTp::IdRole).toString() == entity.id()) {
- //kDebug() << " Found matching persona" << m_personsModel->data(index, PersonsModel::UriRole).toString();
- //kDebug() << " Found matching contact" << m_personsModel->data(childIndex, PersonsModel::IMRole).toString();
+ //qCDebug(KTP_LOGVIEWER) << " Found matching persona" << m_personsModel->data(index, PersonsModel::UriRole).toString();
+ //qCDebug(KTP_LOGVIEWER) << " Found matching contact" << m_personsModel->data(childIndex, PersonsModel::IMRole).toString();
parentItem = itemForPersona(index);
personaIndex = index;
contactIndex = childIndex;
@@ -444,7 +444,7 @@ void PersonEntityMergeModel::initializeModel()
}
if (!contactIndex.isValid() && !personaIndex.isValid()) {
- kDebug() << " No match";
+ qCDebug(KTP_LOGVIEWER) << " No match";
// If we don't have kpeople, we don't have information about group
// membership, so fallback to grouping by account
if (KTp::kpeopleEnabled()) {
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list