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

Cannot generate efficient code for calls to StackView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.7
    • 6.6.1, 6.6.2
    • QML: Compiler, QML: Tooling
    • None
    • Android, Linux/Wayland
    • 3e619367b13399eb17224594722af06c6620cf03

    Description

      Take the code for StackView from https://doc.qt.io/qt-6/qml-qtquick-controls-stackview.html#details.

      Enable qmlsc direct calls with:

      set_target_properties(${PROJECT_NAME} PROPERTIES
          QT_QMLCACHEGEN_DIRECT_CALLS ON
          QT_QMLCACHEGEN_ARGUMENTS "--verbose"
      ) 

      It results in Warnings:

      Cannot generate efficient code for call
      
      Generating .rcc/qmlcache/Test_Main_qml.cpp
      Warning: Main.qml:26:34: Cannot generate efficient code for call to untyped JavaScript function [compiler]
                      onClicked: stack.push(mainView)
                                       ^^^^
      Warning: Main.qml:31:34: Cannot generate efficient code for call to untyped JavaScript function [compiler]
                      onClicked: stack.pop() 

      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
            plew Przemyslaw Lewandowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes