X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a8a050952df82d8f9cc1191f410fca7c6a219da3..613a132a3697db603bca593a36f91ee3f9ccafdd:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 668f92b7c..d4276d492 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -606,23 +606,26 @@ void DolphinMainWindow::editSettings() void DolphinMainWindow::init() { + DolphinSettings& settings = DolphinSettings::instance(); + // Check whether Dolphin runs the first time. If yes then // a proper default window size is given at the end of DolphinMainWindow::init(). - GeneralSettings* generalSettings = DolphinSettings::instance().generalSettings(); + GeneralSettings* generalSettings = settings.generalSettings(); 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); m_splitter = new QSplitter(this); - DolphinSettings& settings = DolphinSettings::instance(); - setupActions(); - const KUrl& homeUrl = settings.generalSettings()->homeUrl(); + const KUrl& homeUrl = generalSettings->homeUrl(); setCaption(homeUrl.fileName()); m_actionHandler = new DolphinViewActionHandler(actionCollection(), this); connect(m_actionHandler, SIGNAL(actionBeingHandled()), SLOT(clearStatusBar()));