diff options
| author | Peter Penz <[email protected]> | 2012-04-10 16:30:50 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-04-10 16:36:26 +0200 |
| commit | d9dbd3398a258d04ec4517fd13e795b437c869d6 (patch) | |
| tree | 6f608d12001818cd416271ac7c4f462e9ddefc7a /src/views | |
| parent | b8c3d933e66598c78180a73cb394b211ca6b52d0 (diff) | |
Improvements for slow sorting roles
If the sorting is done for data which is resolved asynchronously
(e.g. rating), it is important to give a visual feedback about
the state of the sorting. This is done now by a progress
indication in the statusbar.
Also optimizations for "Sort by type" have been done: Although
resolving a type can be expensive in the most often case it is a
very cheap operation. So it the sorting is done by type, try
to resolve the type synchronously for at least 200 ms to prevent
a asynchronous resorting. This is usually sufficient to have
resolved types even for directories with several thousands of
items.
BUG: 292733
FIXED-IN: 4.9.0
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 1 | ||||
| -rw-r--r-- | src/views/dolphinview.h | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 872853642..2ffc33e08 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -158,6 +158,7 @@ DolphinView::DolphinView(const KUrl& url, QWidget* parent) : KFileItemModel* model = fileItemModel(); if (model) { connect(model, SIGNAL(loadingCompleted()), this, SLOT(slotLoadingCompleted())); + connect(model, SIGNAL(sortProgress(int)), this, SIGNAL(sortProgress(int))); } KItemListView* view = controller->view(); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 130657b16..b1d057e6f 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -492,6 +492,8 @@ signals: */ void pathLoadingProgress(int percent); + void sortProgress(int percent); + /** * Is emitted if the DolphinView::setUrl() is invoked but the URL is not * a directory. @@ -670,8 +672,6 @@ private slots: void hideToolTip(); - //void slotUrlChangeRequested(const KUrl& url); - private: KFileItemModel* fileItemModel() const; |
