]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Remove "FirstRun" property
authorPeter Penz <peter.penz19@gmail.com>
Sun, 14 Aug 2011 13:30:29 +0000 (15:30 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 14 Aug 2011 13:31:58 +0000 (15:31 +0200)
The property got obsoleted by the "Version" property.

src/dolphinmainwindow.cpp
src/settings/dolphin_generalsettings.kcfg

index f495cef54e7f8320e1c2af2e6b417083b52bca6f..76d61978f7b049f79a721b7375db2dbf886f0112 100644 (file)
@@ -99,7 +99,7 @@
 namespace {
     // Used for GeneralSettings::version() to determine whether
     // an updated version of Dolphin is running.
-    const int CurrentDolphinVersion = 171;
+    const int CurrentDolphinVersion = 200;
 };
 
 /*
@@ -172,7 +172,7 @@ DolphinMainWindow::DolphinMainWindow() :
     const DolphinSettings& settings = DolphinSettings::instance();
 
     GeneralSettings* generalSettings = settings.generalSettings();
-    const bool firstRun = generalSettings->firstRun();
+    const bool firstRun = (generalSettings->version() < 200);
     if (firstRun) {
         generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime());
     }
@@ -652,9 +652,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
         }
     }
 
-    generalSettings->setFirstRun(false);
     generalSettings->setVersion(CurrentDolphinVersion);
-
     settings.save();
 
     if (m_searchDockIsTemporaryVisible) {
@@ -1845,24 +1843,16 @@ void DolphinMainWindow::setupDockWidgets()
             searchPanel, SLOT(setUrl(KUrl)));
 #endif
 
-    const GeneralSettings* generalSettings = DolphinSettings::instance().generalSettings();
-    const bool firstRun = generalSettings->firstRun();
-    if (firstRun) {
+    if (DolphinSettings::instance().generalSettings()->version() < 200) {
         infoDock->hide();
         foldersDock->hide();
 #ifndef Q_OS_WIN
         terminalDock->hide();
 #endif
-    }
-
 #ifdef HAVE_NEPOMUK
-    // The search dock has been introduced with Dolphin 1.7.0. Hide it per
-    // default when updating from an older Dolphin version or when Dolphin is
-    // started the first time.
-    if (firstRun || generalSettings->version() < 170) {
         searchDock->hide();
-    }
 #endif
+    }
 
     // Setup "Places"
     DolphinDockWidget* placesDock = new DolphinDockWidget(i18nc("@title:window", "Places"));
index c5f6f745618a578b9179236951174420d160b361..74b0ad2ae6a348ad303d27e74961c4aa971023c1 100644 (file)
             <label>Should the full path be shown inside the location bar</label>
             <default>false</default>
         </entry>
-        <entry name="FirstRun" type="Bool">
-            <label>Is the application started the first time (internal setting not shown in the UI)</label>
-            <default>true</default>
-        </entry>
         <entry name="Version" type="Int">
             <label>Internal version of Dolphin, containing 3 digits for mayor, minor, bugfix</label>
             <default>0</default>