Commit 48158d70 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

Remove MaximumSize entry from kdeglobals when settings the preview file size limit to "No limit"

Instead of setting it to 0, which KIO's PreviewJob interprets as "No previews", breaking previews in konsole and Plasma desktop

BUG: 424403
parent 52a7af86
......@@ -131,10 +131,14 @@ void PreviewsSettingsPage::applySettings()
KConfigGroup globalConfig(KSharedConfig::openConfig(), QStringLiteral("PreviewSettings"));
globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins);
const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumSize",
maximumLocalSize,
KConfigBase::Normal | KConfigBase::Global);
if (!m_localFileSizeBox->value()) {
globalConfig.deleteEntry("MaximumSize", KConfigBase::Normal | KConfigBase::Global);
} else {
const qulonglong maximumLocalSize = static_cast<qulonglong>(m_localFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumSize",
maximumLocalSize,
KConfigBase::Normal | KConfigBase::Global);
}
const qulonglong maximumRemoteSize = static_cast<qulonglong>(m_remoteFileSizeBox->value()) * 1024 * 1024;
globalConfig.writeEntry("MaximumRemoteSize",
......
Markdown is supported
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