[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam/frameworks] libs: Switch off dynamicSortFilter on out custom models
From:       Marcel Wiesweg <marcel.wiesweg () gmx ! de>
Date:       2015-09-11 9:55:41
Message-ID: E1ZaL3V-0004vT-2N () scm ! kde ! org
[Download RAW message or body]

Git commit 51169c06e62f14bb6ab05b14012cee1a30fe628a by Marcel Wiesweg.
Committed on 11/09/2015 at 09:55.
Pushed by mwiesweg into branch 'frameworks'.

Switch off dynamicSortFilter on out custom models

With Qt4, it was by default switched off. As the default value was
changed in Qt5, it was introduced as a hidden bug and caused major side
effects (fixes the scrolling bug among other, as thumbnail loading would
suddenly cause an unnecessary resorting)

M  +1    -1    libs/models/albumfiltermodel.cpp
M  +1    -0    libs/widgets/itemview/dcategorizedsortfilterproxymodel.cpp

http://commits.kde.org/digikam/51169c06e62f14bb6ab05b14012cee1a30fe628a

diff --git a/libs/models/albumfiltermodel.cpp b/libs/models/albumfiltermode=
l.cpp
index 2d85aec..779e1c4 100644
--- a/libs/models/albumfiltermodel.cpp
+++ b/libs/models/albumfiltermodel.cpp
@@ -55,7 +55,7 @@ AlbumFilterModel::AlbumFilterModel(QObject* const parent)
 =

     // dynamicSortFilter does not work well for us: a dataChange may, beca=
use of our way of filtering,
     // also affect parents and children of the changed index, which is not=
 handled by QSortFilterProxyModel.
-    //setDynamicSortFilter(true);
+    setDynamicSortFilter(false);
     // Instead, we listen directly to AlbumManager's relevant change signa=
ls
     connect(AlbumManager::instance(), SIGNAL(signalAlbumRenamed(Album*)),
             this, SLOT(slotAlbumRenamed(Album*)));
diff --git a/libs/widgets/itemview/dcategorizedsortfilterproxymodel.cpp b/l=
ibs/widgets/itemview/dcategorizedsortfilterproxymodel.cpp
index 33fb91b..7c8bc6d 100644
--- a/libs/widgets/itemview/dcategorizedsortfilterproxymodel.cpp
+++ b/libs/widgets/itemview/dcategorizedsortfilterproxymodel.cpp
@@ -41,6 +41,7 @@ DCategorizedSortFilterProxyModel::DCategorizedSortFilterP=
roxyModel(QObject* cons
     : QSortFilterProxyModel(parent),
       d(new Private())
 {
+    setDynamicSortFilter(false);
 }
 =

 DCategorizedSortFilterProxyModel::~DCategorizedSortFilterProxyModel()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic