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

LoggingCategory object created after property * Changed signal

XMLWordPrintable

    • 58265ef60 (dev), 4922d0bb2 (6.10)

       

      Control {
          id: root
      
          property alias model: list.model
      
          readonly property int modelRowCount: model.rowCount
          onModelRowCountChanged:{
              console.log("Model row count changed");
              console.info(category, "Model row count changed");
          }
      
          LoggingCategory {
              id: category
              name: "logging.category"
              defaultLogLevel: LoggingCategory.Info
              Component.onCompleted: console.log("Logging category completed");
          }
      
          contentItem: ListView {
              id: list
              ...
          }
      }  

      In the above code, the `onModelRowCountChanged` handler is called before the LoggingCategory object has completed (proven by the console.log statements in both).

      This results in the following errors:

      Error: A QmlLoggingCatgory was provided without a valid name

       

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

            qtqmlteam Qt Qml Team User
            ari_murali Ari Muralitharan
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes