diff options
| author | David Faure <[email protected]> | 2007-04-30 11:29:12 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2007-04-30 11:29:12 +0000 |
| commit | 61a4e8691d600a1d105142ce44570c4107600a04 (patch) | |
| tree | 4d828db7c9d6e4c77b357c9ed2cb23ad9ab497ce | |
| parent | 864e8e93b96770e1726137caabdd15aa24adc591 (diff) | |
a bit ugly, but the migration to QList<KFileItem> has to be incremental...
svn path=/trunk/KDE/kdebase/apps/; revision=659519
| -rw-r--r-- | src/dolphinview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 6070fdd66..4c2c5f02d 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -800,7 +800,13 @@ void DolphinView::updateItemCount() void DolphinView::generatePreviews(const KFileItemList& items) { if (m_controller->showPreview()) { - KIO::PreviewJob* job = KIO::filePreview(items, 128); + + // Must turn QList<KFileItem *> 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&))); } @@ -808,7 +814,7 @@ void DolphinView::generatePreviews(const KFileItemList& items) void DolphinView::showPreview(const KFileItem& item, const QPixmap& pixmap) { - Q_ASSERT(item != 0); + Q_ASSERT(!item.isNull()); if (item.url().directory() != m_dirLister->url().path()) { // the preview job is still working on items of an older URL, hence // the item is not part of the directory model anymore |
