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

console.log() for C++ sequence types should have [] wrapping in output

    XMLWordPrintable

Details

    Description

      Currently console.log() lists sequence types without some wrapping [] as usually done for JS arrays. For consistency in developer experience it would be nice to have that though.

      import QtQuick 2.0
      Item {
          Component.onCompleted: {
              console.log("Some QML array-like-object:", Qt.application.arguments);
              console.log("Some JS array object:", ["foo", "bar"]);
          }
      }
      

      Output:

      qml: Some QML array-like-object: qmlscene,logtest.qml
      qml: Some JS array object: [foo,bar]
      

      See also https://bugreports.qt.io/browse/QTBUG-45018

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes