]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix issue, that the file size maximum for non-local previews is read wrong and applie...
authorPeter Penz <peter.penz19@gmail.com>
Sat, 12 Jun 2010 12:57:35 +0000 (12:57 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 12 Jun 2010 12:57:35 +0000 (12:57 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1137339

src/settings/previewssettingspage.cpp

index c6ad08161c723d7e08ddccfdbe2c5f307bc14bbc..1d50f41f0c812a8fdf925f0257ac6905d83ae497 100644 (file)
@@ -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"