[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:07:42 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=ea6e30c
The following commit has been merged in the master branch:
commit ea6e30c0e838039e595f48e3f865bdcef14b7961
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Sun Oct 6 01:27:35 2013 +0000
Fix crash caused by TextChannelWatcherProxyModel
void KTp::TextChannelWatcherProxyModel::onChannelMessagesChanged()
void KTp::TextChannelWatcherProxyModel::onChannelInvalidated()
emit dataChanged() using indexes from the wrong model.
Because it's an QIdentityProxyModel it never causes any harm,
but it's still "wrong" so Qt asserts break in the grouping model.
BUG: 325679
REVIEW: 113126
---
KTp/Models/text-channel-watcher-proxy-model.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/KTp/Models/text-channel-watcher-proxy-model.cpp b/KTp/Models/text-channel-watcher-proxy-model.cpp
index ea863fd..8a82b58 100644
--- a/KTp/Models/text-channel-watcher-proxy-model.cpp
+++ b/KTp/Models/text-channel-watcher-proxy-model.cpp
@@ -220,7 +220,7 @@ void KTp::TextChannelWatcherProxyModel::onChannelMessagesChanged()
{
ChannelWatcher* watcher = qobject_cast<ChannelWatcher*>(sender());
Q_ASSERT(watcher);
- QModelIndex index = watcher->modelIndex();
+ const QModelIndex &index = mapFromSource(watcher->modelIndex());
dataChanged(index, index);
}
@@ -228,8 +228,8 @@ void KTp::TextChannelWatcherProxyModel::onChannelInvalidated()
{
ChannelWatcher* watcher = qobject_cast<ChannelWatcher*>(sender());
Q_ASSERT(watcher);
- QModelIndex index = watcher->modelIndex();
- KTp::ContactPtr contact = index.data(KTp::ContactRole).value<KTp::ContactPtr>();
+ const QModelIndex &index = mapFromSource(watcher->modelIndex());
+ const KTp::ContactPtr &contact = index.data(KTp::ContactRole).value<KTp::ContactPtr>();
d->currentChannels.remove(contact);
dataChanged(index, index);
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list