[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:54 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=1971d80
The following commit has been merged in the master branch:
commit 1971d80a853616ea418186a94d83bbb907ec1184
Author: Aleix Pol <aleixpol at kde.org>
Date: Wed Jun 10 20:37:19 2015 +0200
Improve how we close all conversations at once
Don't go one by one, close them in bulk. Makes it look less glitchy and
won't freeze the process.
Reviewed by Martin Klapetek
---
KTp/Declarative/conversations-model.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/KTp/Declarative/conversations-model.cpp b/KTp/Declarative/conversations-model.cpp
index 4f4831e..a8ed75c 100644
--- a/KTp/Declarative/conversations-model.cpp
+++ b/KTp/Declarative/conversations-model.cpp
@@ -212,7 +212,10 @@ int ConversationsModel::activeChatIndex() const
void ConversationsModel::closeAllConversations()
{
- Q_FOREACH(Conversation *c, d->conversations) {
- c->requestClose();
+ if (!d->conversations.isEmpty()) {
+ beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
+ d->conversations.clear();
+ endRemoveRows();
+ qDeleteAll(d->conversations);
}
}
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list