]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/19.08'
authorNate Graham <nate@kde.org>
Mon, 9 Sep 2019 13:17:40 +0000 (07:17 -0600)
committerNate Graham <nate@kde.org>
Mon, 9 Sep 2019 13:17:40 +0000 (07:17 -0600)
1  2 
src/views/dolphinviewactionhandler.cpp

index 7086ab627d57146cb2e59fcce64fe48688c2ed3f,a79dacb1f8cac6bbfbd513a8c9b8b7f27eaa448d..4aa59911be8d85a2bdc32bfa4f5f1d96d89b9372
@@@ -163,7 -163,7 +163,7 @@@ void DolphinViewActionHandler::createAc
          "</interface> option is enabled.</para>"));
      compactAction->setWhatsThis(xi18nc("@info:whatsthis Compact view mode",
          "<para>This switches to a compact view mode that lists the folders "
 -        "and files in columns with the names beside the icons. <para></para>"
 +        "and files in columns with the names beside the icons.</para><para>"
          "This helps to keep the overview in folders with many items.</para>"));
      detailsAction->setWhatsThis(xi18nc("@info:whatsthis Details view mode",
          "<para>This switches to a list view mode that focuses on folder "
      QAction* zoomOutAction = KStandardAction::zoomOut(this,
                               &DolphinViewActionHandler::zoomOut,
                               m_actionCollection);
 -    zoomOutAction->setWhatsThis(i18nc("@info:whatsthis zoom in", "This reduces the icon size."));
 +    zoomOutAction->setWhatsThis(i18nc("@info:whatsthis zoom out", "This reduces the icon size."));
  
      KToggleAction* showPreview = m_actionCollection->add<KToggleAction>(QStringLiteral("show_preview"));
      showPreview->setText(i18nc("@action:intoolbar", "Preview"));
  QActionGroup* DolphinViewActionHandler::createFileItemRolesActionGroup(const QString& groupPrefix)
  {
      const bool isSortGroup = (groupPrefix == QLatin1String("sort_by_"));
 -    Q_ASSERT(isSortGroup || (!isSortGroup && groupPrefix == QLatin1String("show_")));
 +    Q_ASSERT(isSortGroup || groupPrefix == QLatin1String("show_"));
  
      QActionGroup* rolesActionGroup = new QActionGroup(m_actionCollection);
      rolesActionGroup->setExclusive(isSortGroup);
@@@ -535,11 -535,11 +535,11 @@@ void DolphinViewActionHandler::slotHidd
  
      // #374508: don't overwrite custom icons.
      const QString iconName = showHiddenFilesAction->icon().name();
 -    if (!iconName.isEmpty() && iconName != QLatin1String("visibility") && iconName != QLatin1String("hint")) {
 +    if (!iconName.isEmpty() && iconName != QLatin1String("view-visible") && iconName != QLatin1String("view-hidden")) {
          return;
      }
  
 -    showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("visibility") : QStringLiteral("hint")));
 +    showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("view-visible") : QStringLiteral("view-hidden")));
  }
  
  void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable)
@@@ -637,9 -637,10 +637,10 @@@ void DolphinViewActionHandler::slotSort
      // and several sub-menus. Because of this they don't have a common
      // action-group that assures an exclusive toggle-state between the main-menu
      // actions and the sub-menu-actions. If an action gets checked, it must
-     // be assured that all other actions get unchecked.
+     // be assured that all other actions get unchecked, except the ascending/
+     // descending actions
      QAction* sortByMenu =  m_actionCollection->action(QStringLiteral("sort"));
-     foreach (QAction* groupAction, sortByMenu->menu()->actions()) {
+     for (QAction *groupAction : qAsConst(m_sortByActions)) {
          KActionMenu* actionMenu = qobject_cast<KActionMenu*>(groupAction);
          if (actionMenu) {
              foreach (QAction* subAction, actionMenu->menu()->actions()) {