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
This commit is contained in:
Peter Penz 2007-08-16 15:28:30 +00:00
parent 7cd37f4747
commit 78f8358cd5
2 changed files with 9 additions and 3 deletions

View file

@ -497,10 +497,16 @@ void DolphinView::triggerItem(const QModelIndex& index)
}
}
void DolphinView::generatePreviews(const QList<KFileItem>& items)
void DolphinView::generatePreviews(const KFileItemList& items)
{
if (m_controller->showPreview()) {
KIO::PreviewJob* job = KIO::filePreview(items, 128);
// QList<KFileItem*> must be turned to QList<KFileItem>...
QList<KFileItem> 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&)));
}

View file

@ -406,7 +406,7 @@ private slots:
* The current preview settings (maximum size, 'Show Preview' menu)
* are respected.
*/
void generatePreviews(const QList<KFileItem>& items);
void generatePreviews(const KFileItemList& items);
/**
* Replaces the icon of the item \a item by the preview pixmap