X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8fa3e7c14521199390af02b08b4086a3da71f60c..37deaaef2c39a4c4b410cd0313a55a4072d2b2ff:/src/dolphinmainwindow.cpp?ds=sidebyside diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 37f6bb8e4..77937790a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -580,6 +581,14 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) } } + if (GeneralSettings::rememberOpenedTabs()) { + KConfigGui::setSessionConfig(QStringLiteral("dolphin"), QStringLiteral("dolphin")); + KConfig *config = KConfigGui::sessionConfig(); + saveGlobalProperties(config); + savePropertiesInternal(config, 1); + config->sync(); + } + GeneralSettings::setVersion(CurrentDolphinVersion); GeneralSettings::self()->save(); @@ -960,7 +969,7 @@ QPointer DolphinMainWindow::preferredSearchTool() { m_searchTools.clear(); KMoreToolsMenuFactory("dolphin/search-tools").fillMenuFromGroupingNames( - &m_searchTools, { "files-find" }, QUrl::fromLocalFile(activeContainerLocalPath()) + &m_searchTools, { "files-find" }, m_activeViewContainer->url() ); QList actions = m_searchTools.actions(); if (actions.isEmpty()) { @@ -2301,8 +2310,6 @@ bool DolphinMainWindow::event(QEvent *event) QWhatsThisClickedEvent* whatsThisEvent = dynamic_cast(event); QDesktopServices::openUrl(QUrl(whatsThisEvent->href())); return true; - } else if (event->type() == QEvent::WindowActivate) { - updateOpenPreferredSearchToolAction(); } return KXmlGuiWindow::event(event); }