[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:37 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=066e5e3

The following commit has been merged in the master branch:
commit 066e5e3ef93e8915f9afa20d26a23b06ee41fca2
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Mon Dec 22 12:46:51 2014 +0100

    [Models/contacts-model] Replace QSharedPointer with QPointer
    
    QSharedPointer is causing strange crashes for no reasons. But in this
    place it's not really needed anyway, simple QPointer will do.
    
    Crashes are gone.
    
    Reviewed-by: David Edmundson
---
 KTp/Models/contacts-model.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/KTp/Models/contacts-model.cpp b/KTp/Models/contacts-model.cpp
index bf7c685..d5faed5 100644
--- a/KTp/Models/contacts-model.cpp
+++ b/KTp/Models/contacts-model.cpp
@@ -44,7 +44,7 @@ class ContactsModel::Private
 public:
     GroupMode groupMode;
     bool trackUnread;
-    QSharedPointer<KTp::AbstractGroupingProxyModel> proxy;
+    QPointer<KTp::AbstractGroupingProxyModel> proxy;
     QAbstractItemModel *source;
     Tp::AccountManagerPtr accountManager;
     Tp::ClientRegistrarPtr clientRegistrar;
@@ -179,7 +179,7 @@ void KTp::ContactsModel::updateGroupProxyModels()
 
     //delete any previous proxy
     if (d->proxy) {
-        d->proxy.data()->deleteLater();
+        d->proxy->deleteLater();
     }
 
     switch (d->groupMode) {
@@ -192,12 +192,12 @@ void KTp::ContactsModel::updateGroupProxyModels()
         setSourceModel(modelToGroup);
         break;
     case AccountGrouping:
-        d->proxy = QSharedPointer<KTp::AbstractGroupingProxyModel>(new KTp::AccountsTreeProxyModel(modelToGroup, d->accountManager));
-        setSourceModel(d->proxy.data());
+        d->proxy = new KTp::AccountsTreeProxyModel(modelToGroup, d->accountManager);
+        setSourceModel(d->proxy);
         break;
     case GroupGrouping:
-        d->proxy = QSharedPointer<KTp::AbstractGroupingProxyModel>(new KTp::GroupsTreeProxyModel(modelToGroup));
-        setSourceModel(d->proxy.data());
+        d->proxy = new KTp::GroupsTreeProxyModel(modelToGroup);
+        setSourceModel(d->proxy);
         break;
     }
 }

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list