From 05082aed16cdf7e511d9c97d0cf07e270af493e5 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 8 Apr 2012 16:08:25 +0200 Subject: Ignore maximum size for local files when creating previews It is up to the plugins to decide what sensible size is required for creating a preview, this cannot be decided by the user for all plugins. A maximum size only makes sense for remote files, where the user implicitely decides how much of the bandwith may be used for having previews. BUG: 273226 FIXED-IN: 4.9.0 --- src/kitemviews/kfileitemmodelrolesupdater.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/kitemviews') diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index cd757a826..34165843f 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -608,7 +608,7 @@ void KFileItemModelRolesUpdater::startPreviewJob(const KFileItemList& items) // worst case) might block the application for several seconds. To prevent such // a blocking the MIME-type of the items will determined until the MaxBlockTimeout // has been reached and only those items will get passed. As soon as the MIME-type - // has been resolved once KIO::filePreview() can already access the resolved + // has been resolved once KIO::PreviewJob() can already access the resolved // MIME-type in a fast way. QElapsedTimer timer; timer.start(); @@ -625,7 +625,8 @@ void KFileItemModelRolesUpdater::startPreviewJob(const KFileItemList& items) break; } } - KJob* job = KIO::filePreview(itemSubSet, cacheSize, &m_enabledPlugins); + KIO::PreviewJob* job = new KIO::PreviewJob(itemSubSet, cacheSize, &m_enabledPlugins); + job->setIgnoreMaximumSize(items.first().isLocalFile()); connect(job, SIGNAL(gotPreview(KFileItem,QPixmap)), this, SLOT(slotGotPreview(KFileItem,QPixmap))); -- cgit v1.3