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

Memory leak in QGraphicsLinearLayoutPrivate and QGraphicsGridLayout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 4.6.2, 4.7.0, 5.6.0
    • Widgets: GraphicsView
    • None
    • ea6a5146397b668bf535ee7249bd4262d6185234 fc65b9a7cbed3fe66e3037501b56949bc1d3ae30

    Description

      QLayoutStyleInfo requires a widget to init the style from:
      m_styleOption.initFrom(widget);

      From QGraphicsLinearLayoutPrivate::styleInfo() and QGraphicsGridLayout::styleInfo() we are creating a pointer to a QWidget like:
      static QWidget *wid = 0;
      if (!wid)
      wid = new QWidget;

      and then passing it to:
      return QLayoutStyleInfo(style, wid);

      But that creates a leak. It will be nice to review the QLayoutStyleInfo to update this part of the code. QLayoutStyleInfo is only used in graphics view.

      Attachments

        Issue Links

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

          Activity

            People

              peppe Giuseppe D'Angelo
              sanonymous Nokia Qt Support (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes