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

Superfluous RestoreAction is shown in context menu of QMdiAreaTabBar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.8.3, 5.0.0
    • 4.7.1, 4.8.3, 5.0.0
    • GUI: Workspace
    • None
    • 54e25f3d27278b22649a35f2ffead4474f3add79 (4.8)

    Description

      In TabbedView mode of QMdiArea, context menu of the tabs consists of 2 actions: "Close" and "Restore". The latter is irrelevant in the TabbedView mode; clicking it results in unexpected behaviour: a mix of tabs and mdi windows is displayed.

      The reason of this error resides in banal copy&paste typo in qmdiarea.cpp (line 622):

      void QMdiAreaTabBar::contextMenuEvent(QContextMenuEvent *event)
      {
          ...
      
          // We don't want these actions to show up in the system menu when the
          // current sub-window is maximized, i.e. covers the entire viewport.
          if (currentSubWindow->isMaximized()) {
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::MoveAction, false);
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::ResizeAction, false);
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::MinimizeAction, false);
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::MaximizeAction, false);
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::MaximizeAction, false);
              subWindowPrivate->setVisible(QMdiSubWindowPrivate::StayOnTopAction, false);
          }
      

      Please notice 2 identical lines with MaximizeAction, one of them should be RestoreAction instead.

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            varlax Alexey Varlamov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes