]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/previewssettingspage.cpp
Fix issue, that the file size maximum for non-local previews is read wrong and applie...
[dolphin.git] / src / settings / previewssettingspage.cpp
index 2267d3ef1a2c058a8abf85c8b356c7b2cb0a0bcc..1d50f41f0c812a8fdf925f0257ac6905d83ae497 100644 (file)
@@ -71,7 +71,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
     listBoxLayout->addWidget(m_previewPluginsList);
 
     // Create group box "Don't create previews for"
-    QGroupBox* fileSizeBox = new QGroupBox(i18nc("@title:group", "Don't create previews for"), this);
+    QGroupBox* fileSizeBox = new QGroupBox(i18nc("@title:group", "Do not create previews for"), this);
 
     QLabel* localFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Local files above:> XX MByte",
                                                   "Local files above:"), this);
@@ -128,7 +128,7 @@ void PreviewsSettingsPage::applySettings()
     globalConfig.writeEntry("MaximumSize",
                             m_localFileSizeBox->value() * 1024 * 1024,
                             KConfigBase::Normal | KConfigBase::Global);
-    globalConfig.writeEntry("RemoteMaximumSize",
+    globalConfig.writeEntry("MaximumRemoteSize",
                             m_remoteFileSizeBox->value() * 1024 * 1024,
                             KConfigBase::Normal | KConfigBase::Global);
     globalConfig.sync();
@@ -169,16 +169,13 @@ void PreviewsSettingsPage::loadSettings()
                                                      << QLatin1String("imagethumbnail")
                                                      << QLatin1String("jpegthumbnail"));
 
-    // TODO: The default value of 5 MB must match with the default value inside
-    // kdelibs/kio/kio/previewjob.cpp. Maybe a static getter method in PreviewJob
-    // should be added for getting the default size?
     const int maxLocalByteSize = globalConfig.readEntry("MaximumSize", MaxLocalPreviewSize * 1024 * 1024);
     const int maxLocalMByteSize = maxLocalByteSize / (1024 * 1024);
     m_localFileSizeBox->setValue(maxLocalMByteSize);
 
-    const int maxRemoteByteSize = globalConfig.readEntry("MaximumSize", MaxRemotePreviewSize * 1024 * 1024);
+    const int maxRemoteByteSize = globalConfig.readEntry("MaximumRemoteSize", MaxRemotePreviewSize * 1024 * 1024);
     const int maxRemoteMByteSize = maxRemoteByteSize / (1024 * 1024);
-    m_localFileSizeBox->setValue(maxRemoteMByteSize);
+    m_remoteFileSizeBox->setValue(maxRemoteMByteSize);
 }
 
 #include "previewssettingspage.moc"