mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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:
parent
7cd37f4747
commit
78f8358cd5
2 changed files with 9 additions and 3 deletions
|
@ -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&)));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue