X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d3496b12310d9fec0e52e537c341e87fcaa2f8b5..ca5d3fde114dfdb280e46995e8a425d3ec558596:/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);