diff options
| author | Peter Penz <[email protected]> | 2008-02-15 23:13:47 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-02-15 23:13:47 +0000 |
| commit | f70b85b4ca2b96ebf578d4db790a8ac3f69f766e (patch) | |
| tree | 9667d57e8158141cb012de02fa95218a95223b0d | |
| parent | d38de66f4b97a6d9cd30f3fc69e66b343ca312dc (diff) | |
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: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=775494
| -rw-r--r-- | src/dolphin_generalsettings.kcfg | 3 | ||||
| -rw-r--r-- | src/dolphinmainwindow.cpp | 3 | ||||
| -rw-r--r-- | src/startupsettingspage.cpp | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/dolphin_generalsettings.kcfg b/src/dolphin_generalsettings.kcfg index 33b66a177..840d8a42d 100644 --- a/src/dolphin_generalsettings.kcfg +++ b/src/dolphin_generalsettings.kcfg @@ -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> diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index d4276d492..dd8b02efb 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -614,9 +614,6 @@ void DolphinMainWindow::init() 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); diff --git a/src/startupsettingspage.cpp b/src/startupsettingspage.cpp index a7c62254e..d056c91a6 100644 --- a/src/startupsettingspage.cpp +++ b/src/startupsettingspage.cpp @@ -140,7 +140,7 @@ void StartupSettingsPage::useCurrentLocation() void StartupSettingsPage::useDefaultLocation() { - m_homeUrl->setText("file://" + QDir::homePath()); + m_homeUrl->setText(QDir::homePath()); } void StartupSettingsPage::loadSettings() |
