From 7df84881251f60d2bd501eab3f2d1413e9823b21 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 28 Feb 2011 22:04:00 +0100 Subject: Fix issue that wrong directory is shown Commit 680009b522b2c9eda03201ac02dc18994b5a8bd0 resulted in a regression when switching from a view in the column-mode to a view in the icon- or details-mode: The wrong content has been shown. This patch reverts commit 680009b522b2c9eda03201ac02dc18994b5a8bd0 and solves the performance-issue in combination with previews by triggering the preview-generation in a queued way. --- src/views/viewextensionsfactory.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/views/viewextensionsfactory.cpp') diff --git a/src/views/viewextensionsfactory.cpp b/src/views/viewextensionsfactory.cpp index 1a395dea9..a52871ff4 100644 --- a/src/views/viewextensionsfactory.cpp +++ b/src/views/viewextensionsfactory.cpp @@ -73,8 +73,14 @@ ViewExtensionsFactory::ViewExtensionsFactory(QAbstractItemView* view, this, SLOT(slotZoomLevelChanged())); connect(viewModeController, SIGNAL(cancelPreviews()), this, SLOT(cancelPreviews())); + + // slotPreviewChanged() is connected as Qt::QueuedConnection to prevent performance + // issues when the directory lister changes its URL after the preview-changes have + // been applied. Usecase: Switch from directory A having no previews to + // directory B with previews (see sequence in DolphinView::setUrl()). connect(dolphinViewController->view(), SIGNAL(showPreviewChanged()), - this, SLOT(slotShowPreviewChanged())); + this, SLOT(slotShowPreviewChanged()), + Qt::QueuedConnection); // initialize selection manager m_selectionManager = new SelectionManager(view); -- cgit v1.3