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

Details

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

    Description

      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!")
                                         ^^^
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes