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

[Reg 6.2.6 -> 6.4.0] qmlsc: Use of native JS console is now treated as an Error

XMLWordPrintable

    • 1de633b2f2 (qt/tqtc-qmlcompilerplus/dev) 7b856e2caf (qt/tqtc-qmlcompilerplus/6.4)

      Code

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Component.onCompleted: console.log("Hello!")
      }
      

       

      Compile Output

      Error: main.qml: Object type Console is not derived from QObject or QQmlComponent. You may need to fully qualify all names in C++ so that moc can see them. You may also need to add qt_extract_metatypes(<target containing >).
      Error: main.qml:8:36: Could not compile binding for onCompleted: Cannot generate efficient code for call to untyped JavaScript function
          Component.onCompleted: console.log("Hello!")
                                         ^^^
      

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

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes