]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
DolphinView: rename copySelectedItems to copySelectedItemsToClipboard
[dolphin.git] / src / dolphinmainwindow.cpp
index 9fe870044f73e89c6e7ef7efcf71149c41e757ff..ab41e2d7ff5afff0ce2b1e04b0cdc4271809d6c0 100644 (file)
@@ -50,6 +50,7 @@
 #include <KActionMenu>
 #include <KAuthorized>
 #include <KConfig>
+#include <KConfigGui>
 #include <KDualAction>
 #include <KFileItemListProperties>
 #include <KHelpMenu>
@@ -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();
 
@@ -650,7 +659,7 @@ void DolphinMainWindow::cut()
 
 void DolphinMainWindow::copy()
 {
-    m_activeViewContainer->view()->copySelectedItems();
+    m_activeViewContainer->view()->copySelectedItemsToClipboard();
 }
 
 void DolphinMainWindow::paste()
@@ -960,7 +969,7 @@ QPointer<QAction> 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<QAction*> actions = m_searchTools.actions();
     if (actions.isEmpty()) {
@@ -1269,7 +1278,7 @@ void DolphinMainWindow::tabCountChanged(int count)
 
 void DolphinMainWindow::updateWindowTitle()
 {
-    const QString newTitle = m_activeViewContainer->caption();
+    const QString newTitle = m_activeViewContainer->captionWindowTitle();
     if (windowTitle() != newTitle) {
         setWindowTitle(newTitle);
     }
@@ -2301,8 +2310,6 @@ bool DolphinMainWindow::event(QEvent *event)
         QWhatsThisClickedEvent* whatsThisEvent = dynamic_cast<QWhatsThisClickedEvent*>(event);
         QDesktopServices::openUrl(QUrl(whatsThisEvent->href()));
         return true;
-    } else if (event->type() == QEvent::WindowActivate) {
-        updateOpenPreferredSearchToolAction();
     }
     return KXmlGuiWindow::event(event);
 }