From 78f8358cd5d3bdd2ca6755a7fbfcb28bddacbc6c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 16 Aug 2007 15:28:30 +0000 Subject: [PATCH] preview did not work anymore (KDirLister emits the signal newItems(const KFileItemList&) -> generatePreviews() from Dolphin must have the same signature) svn path=/trunk/KDE/kdebase/apps/; revision=700834 --- src/dolphinview.cpp | 10 ++++++++-- src/dolphinview.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 6053ac189f..d74d9a64c4 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -497,10 +497,16 @@ void DolphinView::triggerItem(const QModelIndex& index) } } -void DolphinView::generatePreviews(const QList& items) +void DolphinView::generatePreviews(const KFileItemList& items) { if (m_controller->showPreview()) { - KIO::PreviewJob* job = KIO::filePreview(items, 128); + // QList must be turned to QList... + QList itemsToPreview; + foreach (KFileItem* it, items) { + itemsToPreview.append(*it); + } + + KIO::PreviewJob* job = KIO::filePreview(itemsToPreview, 128); connect(job, SIGNAL(gotPreview(const KFileItem&, const QPixmap&)), this, SLOT(showPreview(const KFileItem&, const QPixmap&))); } diff --git a/src/dolphinview.h b/src/dolphinview.h index cd6bd977af..0ad8de7726 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -406,7 +406,7 @@ private slots: * The current preview settings (maximum size, 'Show Preview' menu) * are respected. */ - void generatePreviews(const QList& items); + void generatePreviews(const KFileItemList& items); /** * Replaces the icon of the item \a item by the preview pixmap