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

"Cannot read property 'topPadding' of null" warning when closing application with an open ColorDialog

    XMLWordPrintable

Details

    Description

      With https://codereview.qt-project.org/c/qt/qtdeclarative/+/393791/19/ applied, running the dialogs manual test, opening a ColorDialog and then quitting the application (while the dialog is still open) I get this warning:

      47:12:193 qrc:/qt-project.org/imports/QtQuick/Dialogs/quickimpl/qml/SaturationLightnessPicker.qml:74:9: TypeError: Cannot read property 'topPadding' of null
      

      I don't get the same warning if I use control.topPadding elsewhere; e.g.

      diff --git a/src/quickdialogs2/quickdialogs2quickimpl/qml/SaturationLightnessPicker.qml b/src/quickdialogs2/quickdialogs2quickimpl/qml/SaturationLightnessPicker.qml
      index f9d4107234..5e102e07ac 100644
      --- a/src/quickdialogs2/quickdialogs2quickimpl/qml/SaturationLightnessPicker.qml
      +++ b/src/quickdialogs2/quickdialogs2quickimpl/qml/SaturationLightnessPicker.qml
      @@ -55,6 +55,7 @@ SaturationLightnessPickerImpl {
           }
       
           contentItem: ShaderEffect {
      +        x: control.topPadding
               width: 64
               height: 64
               scale: contentItem.width / width
      

      I would have thought the handle would be destroyed before the SaturationLightnessPickerImpl (which is its parent - I checked and it's SaturationLightnessPicker_QMLTYPE_74(0x600002dff8e0)).

      Also, from what I can see, the deferred execution code for handle is the same as that of contentItem.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes