]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'release/20.04'
authorKai Uwe Broulik <kde@privat.broulik.de>
Wed, 6 May 2020 08:52:38 +0000 (10:52 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Wed, 6 May 2020 08:52:38 +0000 (10:52 +0200)
1  2 
src/dolphinmainwindow.cpp

index 6a5fdb1c49cd47f7c357920b0feab4dd84c8baad,f374db41ded32c1a4a169a4963bea4a32d61903c..77937790aa08ea286f991b27b568966ea19f7812
  #include <KActionMenu>
  #include <KAuthorized>
  #include <KConfig>
 +#include <KConfigGui>
  #include <KDualAction>
  #include <KFileItemListProperties>
  #include <KHelpMenu>
 +#include <KIO/CommandLauncherJob>
  #include <KIO/JobUiDelegate>
  #include <KIO/OpenFileManagerWindowJob>
  #include <KJobWidgets>
@@@ -581,14 -579,6 +581,14 @@@ void DolphinMainWindow::closeEvent(QClo
          }
      }
  
 +    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();
  
@@@ -936,10 -926,7 +936,10 @@@ void DolphinMainWindow::compareFiles(
      command.append("\" \"");
      command.append(urlB.toDisplayString(QUrl::PreferLocalFile));
      command.append('\"');
 -    KRun::runCommand(command, QStringLiteral("Kompare"), QStringLiteral("kompare"), this);
 +
 +    KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(command, this);
 +    job->setDesktopName(QStringLiteral("org.kde.kompare"));
 +    job->start();
  }
  
  void DolphinMainWindow::toggleShowMenuBar()
@@@ -1278,7 -1265,7 +1278,7 @@@ void DolphinMainWindow::tabCountChanged
  
  void DolphinMainWindow::updateWindowTitle()
  {
 -    const QString newTitle = m_activeViewContainer->caption();
 +    const QString newTitle = m_activeViewContainer->captionWindowTitle();
      if (windowTitle() != newTitle) {
          setWindowTitle(newTitle);
      }
@@@ -2310,8 -2297,6 +2310,6 @@@ bool DolphinMainWindow::event(QEvent *e
          QWhatsThisClickedEvent* whatsThisEvent = dynamic_cast<QWhatsThisClickedEvent*>(event);
          QDesktopServices::openUrl(QUrl(whatsThisEvent->href()));
          return true;
-     } else if (event->type() == QEvent::WindowActivate) {
-         updateOpenPreferredSearchToolAction();
      }
      return KXmlGuiWindow::event(event);
  }