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

setGraphicsEffect does not delete the previously set effect when the effect parameter is NULL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.1
    • 4.6.1
    • Widgets: GraphicsView
    • None
    • Windows XP SP3, Qt 4.6 RC
    • fb78a402b512b017c850e7410745c4d20da04a7c

    Description

      When QGraphicsItem::setGraphicsEffect is called with an effect pointer that is different than the previously set one, the previous effect is uninstalled and deleted. This is fine. However if the new effect ptr is NULL then the previously set effect is just uninstalled, but not deleted. This causes leaks in applications that expect that the previously set effect is deleted properly also when unsetting it via passing NULL.

      Attached is a test application to demonstrate the problem, there will be an assertion due to an effect pointer that is not deleted.

      Attachments

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

        Activity

          People

            ylopes Yoann Lopes
            agocs Laszlo Agocs (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes