[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:04:40 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=30fa275
The following commit has been merged in the master branch:
commit 30fa27572838be56107aac78471fa9327e007c0f
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Fri Nov 18 23:40:40 2011 +0100
Enforce the non-use of Qt keywords
---
models/accounts-filter-model.h | 2 +-
models/accounts-model-item.cpp | 22 +++++++++++-----------
models/accounts-model.cpp | 14 +++++++-------
models/contact-model-item.cpp | 2 +-
models/groups-model-item.cpp | 8 ++++----
models/groups-model.cpp | 16 ++++++++--------
models/proxy-tree-node.cpp | 4 ++--
7 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/models/accounts-filter-model.h b/models/accounts-filter-model.h
index 8b55abb..3a42be7 100644
--- a/models/accounts-filter-model.h
+++ b/models/accounts-filter-model.h
@@ -52,7 +52,7 @@ public:
*/
bool isSortedByPresence() const;
-public slots:
+public Q_SLOTS:
void setShowOfflineUsers(bool showOfflineUsers);
void setFilterString(const QString &str);
/// This overloaded method takes into account showing/hiding offline users
diff --git a/models/accounts-model-item.cpp b/models/accounts-model-item.cpp
index d854d8e..db1d98f 100644
--- a/models/accounts-model-item.cpp
+++ b/models/accounts-model-item.cpp
@@ -245,22 +245,22 @@ void AccountsModelItem::setRequestedPresence(int type, const QString &status, co
void AccountsModelItem::onRemoved()
{
int index = parent()->indexOf(this);
- emit childrenRemoved(parent(), index, index);
+ Q_EMIT childrenRemoved(parent(), index, index);
}
void AccountsModelItem::onChanged()
{
- emit changed(this);
+ Q_EMIT changed(this);
}
void AccountsModelItem::onContactsChanged(const Tp::Contacts &addedContacts,
const Tp::Contacts &removedContacts)
{
- foreach (const Tp::ContactPtr &contact, removedContacts) {
+ Q_FOREACH (const Tp::ContactPtr &contact, removedContacts) {
for (int i = 0; i < size(); ++i) {
ContactModelItem *item = qobject_cast<ContactModelItem *>(childAt(i));
if (item->contact() == contact) {
- emit childrenRemoved(this, i, i);
+ Q_EMIT childrenRemoved(this, i, i);
break;
}
}
@@ -277,13 +277,13 @@ void AccountsModelItem::onContactsChanged(const Tp::Contacts &addedContacts,
}
QList<TreeNode *> newNodes;
- foreach (const Tp::ContactPtr &contact, addedContacts) {
+ Q_FOREACH (const Tp::ContactPtr &contact, addedContacts) {
if (!idList.contains(contact->id())) {
newNodes.append(new ContactModelItem(contact));
}
}
if (!newNodes.isEmpty()) {
- emit childrenAdded(this, newNodes);
+ Q_EMIT childrenAdded(this, newNodes);
}
countOnlineContacts();
@@ -293,7 +293,7 @@ void AccountsModelItem::onStatusChanged(Tp::ConnectionStatus status)
{
onChanged();
- emit connectionStatusChanged(mPriv->mAccount->uniqueIdentifier(), status);
+ Q_EMIT connectionStatusChanged(mPriv->mAccount->uniqueIdentifier(), status);
}
void AccountsModelItem::onNewConnection()
@@ -310,7 +310,7 @@ void AccountsModelItem::onConnectionChanged(const Tp::ConnectionPtr &connection)
|| !connection->isValid()
|| connection->status() == Tp::ConnectionStatusDisconnected) {
if (size() > 0) {
- emit childrenRemoved(this, 0, size() - 1);
+ Q_EMIT childrenRemoved(this, 0, size() - 1);
}
return;
}
@@ -356,7 +356,7 @@ void AccountsModelItem::clearContacts()
}
}
if (!exists) {
- emit childrenRemoved(this, i, i);
+ Q_EMIT childrenRemoved(this, i, i);
}
}
}
@@ -383,7 +383,7 @@ void AccountsModelItem::addKnownContacts()
}
// only add the contact item if it is new
- foreach (const Tp::ContactPtr &contact, contacts) {
+ Q_FOREACH (const Tp::ContactPtr &contact, contacts) {
if (!idList.contains(contact->id())) {
newNodes.append(new ContactModelItem(contact));
}
@@ -391,7 +391,7 @@ void AccountsModelItem::addKnownContacts()
}
if (newNodes.count() > 0) {
- emit childrenAdded(this, newNodes);
+ Q_EMIT childrenAdded(this, newNodes);
}
countOnlineContacts();
diff --git a/models/accounts-model.cpp b/models/accounts-model.cpp
index 21f14cb..00259d5 100644
--- a/models/accounts-model.cpp
+++ b/models/accounts-model.cpp
@@ -64,7 +64,7 @@ AccountsModel::AccountsModel(const Tp::AccountManagerPtr &am, QObject *parent)
SIGNAL(childrenRemoved(TreeNode*,int,int)),
SLOT(onItemsRemoved(TreeNode*,int,int)));
- foreach (Tp::AccountPtr account, mPriv->mAM->allAccounts()) {
+ Q_FOREACH (Tp::AccountPtr account, mPriv->mAM->allAccounts()) {
AccountsModelItem *item = new AccountsModelItem(account);
connect(item, SIGNAL(connectionStatusChanged(QString,int)),
this, SIGNAL(accountConnectionStatusChanged(QString,int)));
@@ -141,11 +141,11 @@ void AccountsModel::onItemChanged(TreeNode *node)
qobject_cast<AccountsModelItem*>(node)->countOnlineContacts();
} else {
qobject_cast<AccountsModelItem*>(node->parent())->countOnlineContacts();
- emit dataChanged(index(node->parent()), index(node->parent()));
+ Q_EMIT dataChanged(index(node->parent()), index(node->parent()));
}
}
QModelIndex accountIndex = index(node);
- emit dataChanged(accountIndex, accountIndex);
+ Q_EMIT dataChanged(accountIndex, accountIndex);
}
void AccountsModel::onItemsAdded(TreeNode *parent, const QList<TreeNode *> &nodes)
@@ -153,11 +153,11 @@ void AccountsModel::onItemsAdded(TreeNode *parent, const QList<TreeNode *> &node
QModelIndex parentIndex = index(parent);
int currentSize = rowCount(parentIndex);
beginInsertRows(parentIndex, currentSize, currentSize + nodes.size() - 1);
- foreach (TreeNode *node, nodes) {
+ Q_FOREACH (TreeNode *node, nodes) {
parent->addChild(node);
}
endInsertRows();
- emit accountCountChanged();
+ Q_EMIT accountCountChanged();
}
void AccountsModel::onItemsRemoved(TreeNode *parent, int first, int last)
@@ -170,7 +170,7 @@ void AccountsModel::onItemsRemoved(TreeNode *parent, int first, int last)
}
endRemoveRows();
- emit accountCountChanged();
+ Q_EMIT accountCountChanged();
}
int AccountsModel::accountCount() const
@@ -322,7 +322,7 @@ QMimeData* AccountsModel::mimeData(const QModelIndexList& indexes) const
QDataStream stream(&encodedData, QIODevice::WriteOnly);
- foreach (const QModelIndex &index, indexes) {
+ Q_FOREACH (const QModelIndex &index, indexes) {
if (index.isValid()) {
ContactModelItem *c = data(index, AccountsModel::ItemRole).value<ContactModelItem*>();
//We put a contact ID and its account ID to the stream, so we can later recreate the contact using AccountsModel
diff --git a/models/contact-model-item.cpp b/models/contact-model-item.cpp
index 67de9fa..821ebfc 100644
--- a/models/contact-model-item.cpp
+++ b/models/contact-model-item.cpp
@@ -177,7 +177,7 @@ bool ContactModelItem::setData(int role, const QVariant &value)
void ContactModelItem::onChanged()
{
- emit changed(this);
+ Q_EMIT changed(this);
}
Tp::ContactPtr ContactModelItem::contact() const
diff --git a/models/groups-model-item.cpp b/models/groups-model-item.cpp
index cbe3da2..9a88788 100644
--- a/models/groups-model-item.cpp
+++ b/models/groups-model-item.cpp
@@ -106,18 +106,18 @@ QString GroupsModelItem::groupName()
void GroupsModelItem::addProxyContact(ProxyTreeNode *proxyNode)
{
- emit childrenAdded(this, QList<TreeNode*>() << proxyNode);
+ Q_EMIT childrenAdded(this, QList<TreeNode*>() << proxyNode);
//the group counters needs to be updated
- emit changed(this);
+ Q_EMIT changed(this);
}
void GroupsModelItem::removeProxyContact(ProxyTreeNode *proxyNode)
{
- emit childrenRemoved(this, indexOf(proxyNode), indexOf(proxyNode));
+ Q_EMIT childrenRemoved(this, indexOf(proxyNode), indexOf(proxyNode));
//the group counters needs to be updated
- emit changed(this);
+ Q_EMIT changed(this);
}
void GroupsModelItem::countOnlineContacts()
diff --git a/models/groups-model.cpp b/models/groups-model.cpp
index e56dc2a..9d7f058 100644
--- a/models/groups-model.cpp
+++ b/models/groups-model.cpp
@@ -143,7 +143,7 @@ QMimeData* GroupsModel::mimeData(const QModelIndexList& indexes) const
QDataStream stream(&encodedData, QIODevice::WriteOnly);
- foreach (const QModelIndex &index, indexes) {
+ Q_FOREACH (const QModelIndex &index, indexes) {
if (index.isValid()) {
ContactModelItem *c = data(index, AccountsModel::ItemRole).value<ContactModelItem*>();
//We put a contact ID and its account ID to the stream, so we can later recreate the contact using AccountsModel
@@ -186,7 +186,7 @@ bool GroupsModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int
contacts.append(qobject_cast<ContactModelItem*>(mPriv->mAM->contactItemForId(accountPtr->uniqueIdentifier(), contact)));
}
- foreach (ContactModelItem *contact, contacts) {
+ Q_FOREACH (ContactModelItem *contact, contacts) {
Q_ASSERT(contact);
QString group = parent.data(GroupsModel::GroupNameRole).toString();
@@ -260,10 +260,10 @@ void GroupsModel::onItemChanged(TreeNode* node)
GroupsModelItem *groupItem = qobject_cast<GroupsModelItem*>(node->parent());
Q_ASSERT(groupItem);
groupItem->countOnlineContacts();
- emit dataChanged(index(node->parent()), index(node->parent()));
+ Q_EMIT dataChanged(index(node->parent()), index(node->parent()));
}
}
- emit dataChanged(index(node), index(node));
+ Q_EMIT dataChanged(index(node), index(node));
}
void GroupsModel::onItemsAdded(TreeNode *parent, const QList<TreeNode *> &nodes)
@@ -271,7 +271,7 @@ void GroupsModel::onItemsAdded(TreeNode *parent, const QList<TreeNode *> &nodes)
QModelIndex parentIndex = index(parent);
int currentSize = rowCount(parentIndex);
beginInsertRows(parentIndex, currentSize, currentSize + nodes.size() - 1);
- foreach (TreeNode *node, nodes) {
+ Q_FOREACH (TreeNode *node, nodes) {
parent->addChild(node);
}
endInsertRows();
@@ -296,8 +296,8 @@ void GroupsModel::onSourceItemsAdded(TreeNode *parent, const QList<TreeNode *> &
{
kDebug() << "Adding" << nodes.size() << "nodes...";
QModelIndex parentIndex = index(parent);
- int currentSize = rowCount(parentIndex);
- foreach (TreeNode *node, nodes) {
+
+ Q_FOREACH (TreeNode *node, nodes) {
ContactModelItem *contactItem = qobject_cast<ContactModelItem*>(node);
QStringList groups = contactItem->contact()->groups();
addContactToGroups(contactItem, groups);
@@ -398,7 +398,7 @@ void GroupsModel::addContactToGroups(ContactModelItem* contactItem, QStringList
groups.removeDuplicates();
- foreach (const QString &group, groups) {
+ Q_FOREACH (const QString &group, groups) {
bool groupExists = false;
GroupsModelItem *groupItem;
diff --git a/models/proxy-tree-node.cpp b/models/proxy-tree-node.cpp
index e413509..4c11484 100644
--- a/models/proxy-tree-node.cpp
+++ b/models/proxy-tree-node.cpp
@@ -81,10 +81,10 @@ void ProxyTreeNode::onSourceNodeRemoved()
{
mPriv->mSource = 0;
int index = parent()->indexOf(this);
- emit childrenRemoved(parent(), index, index);
+ Q_EMIT childrenRemoved(parent(), index, index);
}
void ProxyTreeNode::onSourceChanged()
{
- emit changed(this);
+ Q_EMIT changed(this);
}
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list