diff options
| author | Peter Penz <[email protected]> | 2009-07-19 22:29:59 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-07-19 22:29:59 +0000 |
| commit | d288b1cda477623297c6e25eb63bb1295a99878f (patch) | |
| tree | 63f19107a2967128dee443421fec63c4328f0902 /src/revisioncontrolobserver.cpp | |
| parent | 46dcb12d9f2688bb90a83b8f0dda09b102845eff (diff) | |
- interface cleanups
- the subversion test plugin is at least capable of indicating the revision state for files
svn path=/trunk/KDE/kdebase/apps/; revision=999489
Diffstat (limited to 'src/revisioncontrolobserver.cpp')
| -rw-r--r-- | src/revisioncontrolobserver.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/revisioncontrolobserver.cpp b/src/revisioncontrolobserver.cpp index 95253c59a..246450fe7 100644 --- a/src/revisioncontrolobserver.cpp +++ b/src/revisioncontrolobserver.cpp @@ -26,7 +26,6 @@ #include <QAbstractProxyModel> #include <QAbstractItemView> -#include <QListView> #include <QTimer> /** @@ -163,14 +162,12 @@ void RevisionControlObserver::verifyDirectory() void RevisionControlObserver::applyUpdatedItemStates() { - // Updating items with non-uniform item sizes is a serious bottleneck - // in QListView. Temporary disable the non-uniform item sizes. - QListView* listView = qobject_cast<QListView*>(m_view); - bool uniformSizes = true; - if (listView != 0) { - uniformSizes = listView->uniformItemSizes(); - //listView->setUniformItemSizes(true); TODO: does not work as well as in KFilePreviewGenerator - } + // QAbstractItemModel::setData() triggers a bottleneck in combination with QListView + // (a detailed description of the root cause is given in the class KFilePreviewGenerator + // from kdelibs). To bypass this bottleneck, the signals of the model are temporary blocked. + // This works as the update of the data does not require a relayout of the views used in Dolphin. + const bool signalsBlocked = m_dolphinModel->signalsBlocked(); + m_dolphinModel->blockSignals(true); const QList<ItemState> itemStates = m_updateItemStatesThread->itemStates(); foreach (const ItemState& itemState, itemStates) { @@ -179,11 +176,8 @@ void RevisionControlObserver::applyUpdatedItemStates() Qt::DecorationRole); } - if (listView != 0) { - listView->setUniformItemSizes(uniformSizes); - } - - m_view->viewport()->repaint(); // TODO: this should not be necessary, as DolphinModel::setData() calls dataChanged() + m_dolphinModel->blockSignals(signalsBlocked); + m_view->viewport()->repaint(); if (m_pendingItemStatesUpdate) { m_pendingItemStatesUpdate = false; |
