Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42686

Regression : QFileDialog disable several QActions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.4.0 Beta
    • None
    • OSX, Qt 5.4beta, Qt5.4 November 1st build, ...
    • macOS

    Description

      That's a very weird bug, but very annoying as well for any editing application (text, picture, audio, video...).

      It's OSX specific (testing with 10.9).

      When a QFileDialog is shown, any Edit menu with actions named "Cut", "Copy", "Paste" or "Select All" or some other very common name are disabled !

      Repro with Qt 5.4 beta SDK:
      Open the Qt5.4.0/Examples/Qt-5.4/widgets/mainwindows/mainwindow example.
      in void MainWindow::setupMenuBar(), change to:

          mainWindowMenu = menuBar()->addMenu(tr("Edit"));
      
          action = mainWindowMenu->addAction(tr("Select All"));
          action->setCheckable(true);
          action->setChecked(dockOptions() & AnimatedDocks);
          connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
      
          action = mainWindowMenu->addAction(tr("Cut"));
          action->setCheckable(true);
          action->setChecked(dockOptions() & AllowNestedDocks);
          connect(action, SIGNAL(toggled(bool)), this, SLOT(setDockOptions()));
      

      (I just renamed a menu and few of its action)

      Then build and launch the application, click File/Save Layout or File/Load Layout, cancel that dialog, and see the content of the "Edit" menu: the "Cut" and "Select All" actions have been disabled ! Plus, there's no way to re-enable them...

      The following Menu/Action seems to be affected:
      Edit/Cut
      Edit/Copy
      Edit/Paste
      Edit/Select All
      ...and maybe others.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sorvig Morten Sørvig
              divide Robin Lobel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes