From 093efca22dfd247f06e2a669ad968300e71ef08d Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 26 Sep 2007 18:53:34 +0000 Subject: [PATCH] reactivate ScrollPerPixel again, as the Qt-patch for "divide by zero" has been applied to qt-copy now svn path=/trunk/KDE/kdebase/apps/; revision=717366 --- src/dolphincolumnview.cpp | 13 ++++++------- src/dolphindetailsview.cpp | 7 ++----- src/sidebartreeview.cpp | 7 ++----- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index f6bf00a7a..3f6523ebe 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -118,9 +118,7 @@ ColumnWidget::ColumnWidget(QWidget* parent, viewport()->setAttribute(Qt::WA_Hover); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - // TODO: enable ScrollPerPixel again as soon as a Qt-patch - // is supplied which fixes a possible crash - //setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); setSelectionBehavior(SelectItems); setSelectionMode(QAbstractItemView::ExtendedSelection); setDragDropMode(QAbstractItemView::DragDrop); @@ -807,13 +805,14 @@ void DolphinColumnView::triggerUpdateColumns(const QModelIndex& index) void DolphinColumnView::updateColumns() { + KDirLister* dirLister = m_dolphinModel->dirLister(); + foreach (ColumnWidget* column, m_columns) { + dirLister->updateDirectory(column->url()); + } + const int end = m_columns.count() - 2; // next to last column for (int i = 0; i <= end; ++i) { ColumnWidget* nextColumn = m_columns[i + 1]; - - KDirLister* dirLister = m_dolphinModel->dirLister(); - dirLister->updateDirectory(nextColumn->url()); - const QModelIndex rootIndex = nextColumn->rootIndex(); if (rootIndex.isValid()) { nextColumn->show(); diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index b15de900b..39783c9a9 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -52,11 +52,8 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr setDragDropMode(QAbstractItemView::DragDrop); setDropIndicatorShown(false); setAlternatingRowColors(true); - // TODO: enable ScrollPerPixel again as soon as a Qt-patch - // is supplied which fixes a possible crash - // (see http://lists.kde.org/?l=kde-core-devel&m=119077433611662&w=2) - //setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); - //setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); setMouseTracking(true); viewport()->setAttribute(Qt::WA_Hover); diff --git a/src/sidebartreeview.cpp b/src/sidebartreeview.cpp index 4d8c2cc56..caf1314c6 100644 --- a/src/sidebartreeview.cpp +++ b/src/sidebartreeview.cpp @@ -40,11 +40,8 @@ SidebarTreeView::SidebarTreeView(QWidget* parent) : setDragDropMode(QAbstractItemView::DragDrop); setDropIndicatorShown(false); setAutoExpandDelay(300); - // TODO: enable ScrollPerPixel again as soon as a Qt-patch - // is supplied which fixes a possible crash - // (see http://lists.kde.org/?l=kde-core-devel&m=119077433611662&w=2) - //setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); - //setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); viewport()->setAttribute(Qt::WA_Hover); -- 2.47.3