[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/dolphin/src
From:       Peter Penz <peter.penz () gmx ! at>
Date:       2008-02-15 23:13:47
Message-ID: 1203117227.630516.14220.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 775494 by ppenz:

Initially I thought it's better not having code as default value inside \
dolphin_generalsettings.kcfg. But the check for an empty home URL in \
DolphinMainWindow::init() must also be done when invoking \
GeneralSettings::setDefaults() in StartupSettingsPage, otherwise the home URL would \
get empty... Using QDir::homePath() as default-value inside the *.kcfg file prevents \
such issues.

CCMAIL: michael.a.oshea@gmail.com

 M  +2 -1      dolphin_generalsettings.kcfg  
 M  +0 -3      dolphinmainwindow.cpp  
 M  +1 -1      startupsettingspage.cpp  


--- trunk/KDE/kdebase/apps/dolphin/src/dolphin_generalsettings.kcfg #775493:775494
@@ -2,6 +2,7 @@
 <!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
 <kcfg>
     <kcfgfile name="dolphinrc"/>
+    <include>QDir</include>
     <group name="General">
         <entry name="EditableUrl" type="Bool">
             <label context="@label">Should the URL be editable for the user</label>
@@ -13,7 +14,7 @@
         </entry>
         <entry name="HomeUrl" type="String">
             <label context="@label">Home URL</label>
-            <default></default>
+            <default code="true">QDir::homePath()</default>
         </entry>
         <entry name="SplitView" type="Bool">
             <label context="@label">Split the view into two panes</label>
--- trunk/KDE/kdebase/apps/dolphin/src/dolphinmainwindow.cpp #775493:775494
@@ -614,9 +614,6 @@
     const bool firstRun = generalSettings->firstRun();
     if (firstRun) {
         generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime());
-        Q_ASSERT(generalSettings->homeUrl().isEmpty());
-        const KUrl homeUrl(QDir::homePath());
-        generalSettings->setHomeUrl(homeUrl.prettyUrl());
     }
 
     setAcceptDrops(true);
--- trunk/KDE/kdebase/apps/dolphin/src/startupsettingspage.cpp #775493:775494
@@ -140,7 +140,7 @@
 
 void StartupSettingsPage::useDefaultLocation()
 {
-    m_homeUrl->setText("file://" + QDir::homePath());
+    m_homeUrl->setText(QDir::homePath());
 }
 
 void StartupSettingsPage::loadSettings()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic