┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-04-08 16:08:25 +0200
committerPeter Penz <[email protected]>2012-04-08 16:12:06 +0200
commit05082aed16cdf7e511d9c97d0cf07e270af493e5 (patch)
treef9cf74d24b2e70ab7773a01bc0778dad52545b5d /src/kitemviews
parent02f122f33ce4be24cbf475b34f12c497a706b950 (diff)
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
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp5
1 files changed, 3 insertions, 2 deletions
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)));