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

LoggingCategory object created after property * Changed signal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.10
    • 6.2.5
    • QML: Tooling
    • None

    Description

       

      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

       

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes