[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:34 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=0b3093e
The following commit has been merged in the master branch:
commit 0b3093e981cbbdf5533c7d4eb3eb57c086bf6dbf
Author: Aleix Pol <aleixpol at kde.org>
Date: Mon Dec 15 13:16:48 2014 +0100
Drop KDELibs4Support from KTp::Models
---
KTp/Models/CMakeLists.txt | 6 +++++-
KTp/Models/abstract-grouping-proxy-model.cpp | 10 +++++-----
KTp/Models/accounts-list-model.cpp | 10 +++++-----
KTp/Models/contacts-filter-model.cpp | 4 ++--
KTp/Models/contacts-list-model.cpp | 2 +-
KTp/Models/contacts-model.cpp | 6 +++---
KTp/{Widgets => Models}/debug.cpp | 2 +-
KTp/{Widgets => Models}/debug.h | 7 ++++---
KTp/Models/kpeopletranslationproxy.cpp | 3 +--
KTp/Models/presence-model.cpp | 9 +++++----
KTp/Models/rooms-model.cpp | 2 +-
11 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/KTp/Models/CMakeLists.txt b/KTp/Models/CMakeLists.txt
index 06f83b1..5ae3cb8 100644
--- a/KTp/Models/CMakeLists.txt
+++ b/KTp/Models/CMakeLists.txt
@@ -9,6 +9,7 @@ set (ktp_models_private_SRCS
presence-model.cpp
text-channel-watcher-proxy-model.cpp
rooms-model.cpp
+ debug.cpp
)
set (ktp_models_private_HDRS
@@ -60,7 +61,10 @@ target_link_libraries (KTpModels
PUBLIC
KTp::CommonInternals
PRIVATE
- KF5::KDELibs4Support
+ KF5::I18n
+ KF5::ConfigCore
+ KF5::WidgetsAddons
+ KF5::IconThemes
${ktp_models_private_LIBS}
)
diff --git a/KTp/Models/abstract-grouping-proxy-model.cpp b/KTp/Models/abstract-grouping-proxy-model.cpp
index 077b57b..fea3c4f 100644
--- a/KTp/Models/abstract-grouping-proxy-model.cpp
+++ b/KTp/Models/abstract-grouping-proxy-model.cpp
@@ -23,7 +23,7 @@
#include <QSet>
#include <QTimer>
-#include <KDebug>
+#include "debug.h"
class KTp::AbstractGroupingProxyModel::Private
@@ -265,7 +265,7 @@ void KTp::AbstractGroupingProxyModel::onRowsRemoved(const QModelIndex &sourcePar
QHash<QPersistentModelIndex, ProxyNode*>::const_iterator it = d->proxyMap.constFind(index);
while (it != d->proxyMap.constEnd() && it.key() == index) {
-// kDebug() << "removing row" << index.data();
+// qCDebug(KTP_MODELS) << "removing row" << index.data();
itemsToRemove.append(it.value());
++it;
}
@@ -307,7 +307,7 @@ void KTp::AbstractGroupingProxyModel::onDataChanged(const QModelIndex &sourceTop
//cache to list and remove once outside the const_iterator
removedItems.append(it.value());
- kDebug() << "removing " << index.data().toString() << " from group " << it.value()->group();
+ qCDebug(KTP_MODELS) << "removing " << index.data().toString() << " from group " << it.value()->group();
}
++it;
}
@@ -319,7 +319,7 @@ void KTp::AbstractGroupingProxyModel::onDataChanged(const QModelIndex &sourceTop
GroupNode *groupNode = itemForGroup(group);
addProxyNode(index, groupNode);
- kDebug() << "adding " << index.data().toString() << " to group " << group;
+ qCDebug(KTP_MODELS) << "adding " << index.data().toString() << " to group " << group;
}
}
}
@@ -355,7 +355,7 @@ void KTp::AbstractGroupingProxyModel::onModelReset()
d->groupCache.clear();
d->proxyMap.clear();
d->groupMap.clear();
- kDebug() << "reset";
+ qCDebug(KTP_MODELS) << "reset";
if (d->source->rowCount() > 0) {
onRowsInserted(QModelIndex(), 0, d->source->rowCount()-1);
diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index eff1da8..f73d4d7 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -22,7 +22,7 @@
#include "accounts-list-model.h"
#include <QIcon>
-#include <KDebug>
+#include "debug.h"
#include <KLocalizedString>
#include <KPixmapSequence>
@@ -183,7 +183,7 @@ QModelIndex KTp::AccountsListModel::index(int row, int column, const QModelIndex
void KTp::AccountsListModel::onAccountAdded(const Tp::AccountPtr &account)
{
- kDebug() << "Creating a new Account from account:" << account.data();
+ qCDebug(KTP_MODELS) << "Creating a new Account from account:" << account.data();
// Check if the account is already in the model.
bool found = false;
@@ -198,11 +198,11 @@ void KTp::AccountsListModel::onAccountAdded(const Tp::AccountPtr &account)
}
if (found) {
- kWarning() << "Requested to add account"
+ qCWarning(KTP_MODELS) << "Requested to add account"
<< account.data()
<< "to model, but it is already present. Doing nothing.";
} else {
- kDebug() << "Account not already in model. Create new Account from account:"
+ qCDebug(KTP_MODELS) << "Account not already in model. Create new Account from account:"
<< account.data();
beginInsertRows(QModelIndex(), d->accounts.size(), d->accounts.size());
@@ -243,7 +243,7 @@ void KTp::AccountsListModel::onAccountUpdated()
Q_ASSERT(item);
if (!item) {
- kWarning() << "Not an Account pointer:" << sender();
+ qCWarning(KTP_MODELS) << "Not an Account pointer:" << sender();
return;
}
diff --git a/KTp/Models/contacts-filter-model.cpp b/KTp/Models/contacts-filter-model.cpp
index 86f943c..7eb58be 100644
--- a/KTp/Models/contacts-filter-model.cpp
+++ b/KTp/Models/contacts-filter-model.cpp
@@ -27,7 +27,7 @@
#include <presence.h>
-#include <KDebug>
+#include "debug.h"
class KTp::ContactsFilterModel::Private
@@ -760,7 +760,7 @@ bool ContactsFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &sou
rc = d->filterAcceptsGroup(index);
}
else {
- kDebug() << "Unknown type found in Account Filter";
+ qCDebug(KTP_MODELS) << "Unknown type found in Account Filter";
rc = true;
}
diff --git a/KTp/Models/contacts-list-model.cpp b/KTp/Models/contacts-list-model.cpp
index daca679..06259fc 100644
--- a/KTp/Models/contacts-list-model.cpp
+++ b/KTp/Models/contacts-list-model.cpp
@@ -24,7 +24,7 @@
#include <TelepathyQt/Connection>
#include <TelepathyQt/ContactManager>
#include <TelepathyQt/AccountSet>
-#include <KDebug>
+#include "debug.h"
#include <QPixmap>
#include "contact.h"
diff --git a/KTp/Models/contacts-model.cpp b/KTp/Models/contacts-model.cpp
index daa39f7..19d1f8e 100644
--- a/KTp/Models/contacts-model.cpp
+++ b/KTp/Models/contacts-model.cpp
@@ -34,7 +34,7 @@
#include "kpeopletranslationproxy.h"
#endif
-#include <KDebug>
+#include "debug.h"
namespace KTp
@@ -61,7 +61,7 @@ KTp::ContactsModel::ContactsModel(QObject *parent)
d->trackUnread = false;
if (KTp::kpeopleEnabled()) {
#ifdef HAVE_KPEOPLE
- kDebug() << "Built with kpeople support, using kpeople model";
+ qCDebug(KTP_MODELS) << "Built with kpeople support, using kpeople model";
KPeople::PersonsModel *personsModel = new KPeople::PersonsModel(this);
connect(personsModel, SIGNAL(modelInitialized(bool)),
@@ -73,7 +73,7 @@ KTp::ContactsModel::ContactsModel(QObject *parent)
}
else
{
- kDebug() << "KPeople support not built-in, using normal model";
+ qCDebug(KTP_MODELS) << "KPeople support not built-in, using normal model";
d->source = new KTp::ContactsListModel(this);
connect(d->source, SIGNAL(modelInitialized(bool)),
this, SIGNAL(modelInitialized(bool)));
diff --git a/KTp/Widgets/debug.cpp b/KTp/Models/debug.cpp
similarity index 94%
copy from KTp/Widgets/debug.cpp
copy to KTp/Models/debug.cpp
index b0d9d58..273c714 100644
--- a/KTp/Widgets/debug.cpp
+++ b/KTp/Models/debug.cpp
@@ -17,4 +17,4 @@
*/
#include "debug.h"
-Q_LOGGING_CATEGORY(KTP_WIDGETS, "ktp-widgets")
+Q_LOGGING_CATEGORY(KTP_MODELS, "ktp-models")
diff --git a/KTp/Widgets/debug.h b/KTp/Models/debug.h
similarity index 85%
copy from KTp/Widgets/debug.h
copy to KTp/Models/debug.h
index df73505..fd4b67a 100644
--- a/KTp/Widgets/debug.h
+++ b/KTp/Models/debug.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2014 Martin Klapetek <mklapetek at kde.org>
+ * Copyright (C) 2014 Aleix Pol Gonzalez <aleixpol at blue-systems.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,13 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef KTP_WIDGETS_DEBUG_H
-#define KTP_WIDGETS_DEBUG_H
+#ifndef KTP_MODELS_DEBUG_H
+#define KTP_MODELS_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_WIDGETS)
+Q_DECLARE_LOGGING_CATEGORY(KTP_MODELS)
#endif
diff --git a/KTp/Models/kpeopletranslationproxy.cpp b/KTp/Models/kpeopletranslationproxy.cpp
index 7a108cf..24187da 100644
--- a/KTp/Models/kpeopletranslationproxy.cpp
+++ b/KTp/Models/kpeopletranslationproxy.cpp
@@ -26,7 +26,6 @@
#include "KTp/types.h"
#include <global-contact-manager.h>
-#include <KDebug>
#include <KIconLoader>
#include <KContacts/Addressee>
@@ -54,7 +53,7 @@ QVariant KPeopleTranslationProxy::data(const QModelIndex &proxyIndex, int role)
// IMPersonsDataSource *imPlugin = qobject_cast<IMPersonsDataSource*>(PersonPluginManager::presencePlugin());
//
// if (!imPlugin) {
-// kWarning() << "No imPlugin";
+// qCWarning(KTP_MODELS) << "No imPlugin";
// return QVariant();
// }
//
diff --git a/KTp/Models/presence-model.cpp b/KTp/Models/presence-model.cpp
index 415bf0a..ddc1a7c 100644
--- a/KTp/Models/presence-model.cpp
+++ b/KTp/Models/presence-model.cpp
@@ -26,10 +26,11 @@
#include <QIcon>
#include <QtDBus/QtDBus>
+#include <KSharedConfig>
#include <KLocalizedString>
#include <KConfig>
#include <KConfigGroup>
-#include <KDebug>
+#include "debug.h"
namespace KTp
{
@@ -64,7 +65,7 @@ void PresenceModel::syncCustomPresencesToDisk()
QVariant PresenceModel::data(int index) const
{
if (index < 0 || index >= m_presences.size()) {
- kDebug() << "invalid index data requested" << index;
+ qCDebug(KTP_MODELS) << "invalid index data requested" << index;
return QVariant();
}
@@ -74,7 +75,7 @@ QVariant PresenceModel::data(int index) const
QVariant PresenceModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid()) {
- kDebug() << "invalid index data requested" << index;
+ qCDebug(KTP_MODELS) << "invalid index data requested" << index;
return QVariant();
}
@@ -117,7 +118,7 @@ int PresenceModel::rowCount(const QModelIndex &parent) const
void PresenceModel::loadPresences()
{
- KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
+ KSharedConfigPtr config = KSharedConfig::openConfig(QStringLiteral("ktelepathyrc"));
config->reparseConfiguration();
m_presenceGroup = config->group("Custom Presence List");
m_presences.clear();
diff --git a/KTp/Models/rooms-model.cpp b/KTp/Models/rooms-model.cpp
index cef2797..cce5ac0 100644
--- a/KTp/Models/rooms-model.cpp
+++ b/KTp/Models/rooms-model.cpp
@@ -18,8 +18,8 @@
*/
#include "rooms-model.h"
-#include <KLocale>
#include <QIcon>
+#include <KLocalizedString>
// RoomsModel
KTp::RoomsModel::RoomsModel(QObject *parent): QAbstractListModel(parent)
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list