X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8fa3e7c14521199390af02b08b4086a3da71f60c..42148dd3560c1b075af2035b7f06757db2ceafa3:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 37f6bb8e4..501949a64 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(); @@ -645,12 +654,12 @@ void DolphinMainWindow::undo() void DolphinMainWindow::cut() { - m_activeViewContainer->view()->cutSelectedItems(); + m_activeViewContainer->view()->cutSelectedItemsToClipboard(); } void DolphinMainWindow::copy() { - m_activeViewContainer->view()->copySelectedItems(); + m_activeViewContainer->view()->copySelectedItemsToClipboard(); } void DolphinMainWindow::paste() @@ -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); }