From 4fcb5662a784b8490c989cfda84e5ee649334418 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 6 Nov 2011 09:53:03 +0100 Subject: Fix issues with applying wrong view-mode - The view properties dialog mixed the details-view with the compact-view (#285848). - The view properties have been reset when applying a setting from the "Dolphin Preferences" dialog. The rootcause was that the obsolete DolphinSettings class implemented the saving in a wrong way because of the recent refactoring (will remove this class completely now to prevent such issues in future). BUG: 285848 FIXED-IN: 4.8.0 --- src/dolphinmainwindow.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 34ff8b71b..71e2b2c36 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -165,12 +165,8 @@ DolphinMainWindow::DolphinMainWindow() : this, SLOT(showCommand(CommandType))); connect(DolphinSettings::instance().placesModel(), SIGNAL(errorMessage(QString)), this, SLOT(showErrorMessage(QString))); - //connect(&DragAndDropHelper::instance(), SIGNAL(errorMessage(QString)), - // this, SLOT(showErrorMessage(QString))); - const DolphinSettings& settings = DolphinSettings::instance(); - - GeneralSettings* generalSettings = settings.generalSettings(); + GeneralSettings* generalSettings = GeneralSettings::self(); const bool firstRun = (generalSettings->version() < 200); if (firstRun) { generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime()); @@ -600,8 +596,7 @@ void DolphinMainWindow::showEvent(QShowEvent* event) void DolphinMainWindow::closeEvent(QCloseEvent* event) { - DolphinSettings& settings = DolphinSettings::instance(); - GeneralSettings* generalSettings = settings.generalSettings(); + GeneralSettings* generalSettings = GeneralSettings::self(); // Find out if Dolphin is closed directly by the user or // by the session manager because the session is closed @@ -654,7 +649,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) } generalSettings->setVersion(CurrentDolphinVersion); - settings.save(); + generalSettings->writeConfig(); if (m_searchDockIsTemporaryVisible) { QDockWidget* searchDock = findChild("searchDock"); -- cgit v1.3