┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-02-24 08:25:01 +0000
committerPeter Penz <[email protected]>2009-02-24 08:25:01 +0000
commitbeeb81194cba3ecaa84c6e0e334a702036a26c1e (patch)
tree09757c90158f897415fdf89bc0a086fa7bfd98db /src/dolphiniconsview.cpp
parent7b6ace6466cf349a4ce7a080d5e978aa0a7043e2 (diff)
Stupid me: The inconsistent behavior between QListView::scrollTo() and QTreeView::scrollTo() has been fixed in Qt 4.5 :-) I should have tested this _before_ committing the huge patch for bug 185191... So:
* Remove the workaround in DolphinIconsView::scrollTo() to bypass an issue in Qt 4.4 (-> fixed in Qt 4.5) * Revert the "use the DolphinController"-parts of commit 930754 and just use QAbstractItemView::scrollTo() instead. CCBUG: 185191 svn path=/trunk/KDE/kdebase/apps/; revision=930777
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 4b861df44..4c7e9180f 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -40,7 +40,6 @@
DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) :
KCategorizedView(parent),
- m_enableScrollTo(false),
m_controller(controller),
m_selectionManager(0),
m_autoScroller(0),
@@ -88,8 +87,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
controller, SLOT(emitViewportEntered()));
connect(controller, SIGNAL(zoomLevelChanged(int)),
this, SLOT(setZoomLevel(int)));
- connect(controller, SIGNAL(scrollToCurrentItem()),
- this, SLOT(scrollToCurrentItem()));
const DolphinView* view = controller->dolphinView();
connect(view, SIGNAL(showPreviewChanged()),
@@ -138,19 +135,6 @@ DolphinIconsView::~DolphinIconsView()
m_categoryDrawer = 0;
}
-void DolphinIconsView::scrollTo(const QModelIndex& index, ScrollHint hint)
-{
- // Enable the QListView implementation of scrollTo() only if it has been
- // triggered by a key press. Otherwise QAbstractItemView wants to scroll to the current
- // index each time the layout has been changed. This becomes an issue when
- // previews are loaded and the scrollbar is used: the scrollbar will always
- // be reset to 0 on each new preview.
- if (m_enableScrollTo || (state() != QAbstractItemView::NoState)) {
- KCategorizedView::scrollTo(index, hint);
- m_enableScrollTo = false;
- }
-}
-
void DolphinIconsView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight)
{
KCategorizedView::dataChanged(topLeft, bottomRight);
@@ -263,7 +247,6 @@ void DolphinIconsView::dropEvent(QDropEvent* event)
void DolphinIconsView::keyPressEvent(QKeyEvent* event)
{
- m_enableScrollTo = true; // see DolphinIconsView::scrollTo()
KCategorizedView::keyPressEvent(event);
m_controller->handleKeyPressEvent(event);
}
@@ -392,13 +375,6 @@ void DolphinIconsView::slotGlobalSettingsChanged(int category)
}
}
-void DolphinIconsView::scrollToCurrentItem()
-{
- m_enableScrollTo = true;
- scrollTo(currentIndex());
- m_enableScrollTo = false;
-}
-
void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount)
{
const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();