Commit 487e9537 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Méven Car
Browse files

Don't set ignoreMaximumSize on preview jobs for slow files

With this change (plus frameworks/kio!702), slow files will be treated as remote files for generating previews. This should make browsing local mounts of remote locations smoother.
parent 851b356f
Pipeline #131862 passed with stage
in 3 minutes and 55 seconds
......@@ -1026,7 +1026,7 @@ void KFileItemModelRolesUpdater::startPreviewJob()
KIO::PreviewJob* job = new KIO::PreviewJob(itemSubSet, cacheSize, &m_enabledPlugins);
job->setIgnoreMaximumSize(itemSubSet.first().isLocalFile() && m_localFileSizePreviewLimit <= 0);
job->setIgnoreMaximumSize(itemSubSet.first().isLocalFile() && !itemSubSet.first().isSlow() && m_localFileSizePreviewLimit <= 0);
if (job->uiDelegate()) {
KJobWidgets::setWindow(job, qApp->activeWindow());
}
......@@ -1135,7 +1135,7 @@ void KFileItemModelRolesUpdater::loadNextHoverSequencePreview()
KIO::PreviewJob* job = new KIO::PreviewJob({m_hoverSequenceItem}, cacheSize, &m_enabledPlugins);
job->setSequenceIndex(loadSeqIdx);
job->setIgnoreMaximumSize(m_hoverSequenceItem.isLocalFile() && m_localFileSizePreviewLimit <= 0);
job->setIgnoreMaximumSize(m_hoverSequenceItem.isLocalFile() && !m_hoverSequenceItem.isSlow() && m_localFileSizePreviewLimit <= 0);
if (job->uiDelegate()) {
KJobWidgets::setWindow(job, qApp->activeWindow());
}
......
......@@ -187,7 +187,7 @@ void InformationPanelContent::refreshPixmapView()
QSize(m_preview->width(), m_preview->height()),
&plugins);
m_previewJob->setScaleType(KIO::PreviewJob::Unscaled);
m_previewJob->setIgnoreMaximumSize(m_item.isLocalFile());
m_previewJob->setIgnoreMaximumSize(m_item.isLocalFile() && !m_item.isSlow());
if (m_previewJob->uiDelegate()) {
KJobWidgets::setWindow(m_previewJob, this);
}
......
......@@ -139,7 +139,7 @@ void ToolTipManager::startContentRetrieval()
KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item,
QSize(256, 256),
&plugins);
job->setIgnoreMaximumSize(m_item.isLocalFile());
job->setIgnoreMaximumSize(m_item.isLocalFile() && !m_item.isSlow());
if (job->uiDelegate()) {
KJobWidgets::setWindow(job, qApp->activeWindow());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment