Uploaded image for project: 'Qt Extensions'
  1. Qt Extensions
  2. QTEXT-7

TreeView: crash (as opposed to only runtime warning) if keyword "required" is not satisfied

    XMLWordPrintable

Details

    • e3e41aa125 (qt/qtdeclarative/dev) e3e41aa125 (qt/tqtc-qtdeclarative/dev), 6ff2a8db3 (tqtc/lts-6.2)

    Description

      If a loader is given a source component TreeView which has a required property without a value instead of just giving a warning and the whole app will crash. Won't happen with TableView.

      Steps to reproduce the problem:

      1. Build and run the attached example

      Update: The following (simplified) snippet will also cause a crash

      import QtQuick.Window
      import QtQuick.TreeView
      import Qt.labs.qmlmodels
      
      Window {
          width: 800
          height: 600
          visible: true
      
          Loader {
              anchors.fill: parent
              sourceComponent: TreeView {
                  required property int testProperty
                  delegate: DelegateChooser {
                      DelegateChoice {
                          Rectangle {
                              implicitWidth: 100
                              implicitHeight: 30
                          }
                      }
                  }
              }
          }
      } 

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes