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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst
From:       Craig Drummond <craig () kde ! org>
Date:       2010-01-16 11:27:20
Message-ID: 1263641240.684729.10558.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1075575 by craig:

Call setSortingEnabled(true) after listing is complete - this seems to
fix the issue where the list is sometimes not sorted.
CCBUG: 221610


 M  +9 -0      FontList.cpp  
 M  +2 -1      FontList.h  


--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/FontList.cpp #1075574:1075575
@@ -1378,6 +1378,7 @@
     connect(this, SIGNAL(collapsed(const QModelIndex &)), SLOT(itemCollapsed(const QModelIndex &)));
     connect(header(), SIGNAL(sectionClicked(int)), SLOT(setSortColumn(int)));
     connect(itsProxy, SIGNAL(refresh()), SIGNAL(refresh()));
+    connect(itsModel, SIGNAL(listingPercent(int)), SLOT(listingPercent(int)));
 
     setWhatsThis(model->whatsThis());
     header()->setWhatsThis(whatsThis());
@@ -1541,6 +1542,14 @@
     }
 }
 
+void CFontListView::listingPercent(int percent)
+{
+    // when the font list is first loaded, for some reason it is not always sorted.
+    // re-enabling sorting here seems to fix the issue - BUG 221610
+    if(100==percent)
+        setSortingEnabled(true);
+}
+
 void CFontListView::refreshFilter()
 {
     itsProxy->clear();
--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/FontList.h #1075574:1075575
@@ -338,7 +338,8 @@
     void            reload();
 
     public Q_SLOTS:
-
+        
+    void            listingPercent(int percent);
     void            refreshFilter();
     void            filterText(const QString &text);
     void            filterCriteria(int crit, qulonglong ws);
[prev in list] [next in list] [prev in thread] [next in thread] 

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