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

Get rid of QMainWindowLayout::unusedTabBars

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15, 6.5, 6.8, 6.9
    • Widgets: Main Window
    • None
    • Refactor QMainWindowLayout::unusedTabBars
    • 23357e59b (dev), ab6f1ad77 (6.9), 95c988325 (6.8), b37f84ba4 (dev), 0f7864fd1 (tqtc/lts-6.5), 541d53f28 (6.9), 4ca3bcd1d (6.8), 6f683248e (tqtc/lts-6.5)

      QMainWindowLayout::unusedTabBars contains unparented {{QMainWindowTabBar}}s.
      Such tab bars were leaked, because ~QMainWindowLayout didn't get rid of them.
      As they are widgets, QApplication attempted to delete them upon shut down.
      At this moment, QMainWindow is already demoted to a QWidget and the attempt of ~QMainWindowTabBar to remove itself from QMainWindowLayout::unusedTabBars caused an illegal downcast.

      That can be fixed in ~QMainWindowLayout by not leaking them in the first place.

      However, there is no reason to keep unused, unparented tab bars around. It should therefore be considered to remove the member and create new tab bars when needed.

      Found by mmutz. Thanks!

        For Gerrit Dashboard: QTBUG-135468
        # Subject Branch Project Status CR V

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            axelspoerl Axel Spoerl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: