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

qml type compiler: codegen error with Gradients

    XMLWordPrintable

    Details

    • Commits:
      e98faf1df4 (qt/qtdeclarative/dev) e98faf1df4 (qt/tqtc-qtdeclarative/dev) d1a28bd373 (qt/qtdeclarative/6.3) d1a28bd373 (qt/tqtc-qtdeclarative/6.3) d1a28bd373 (qt/tqtc-qtdeclarative/6.3.1)

      Description

      Using rectangle with gradient generates code which fails to compile:

      import QtQuick 2.12
      
      Item
      {
          Rectangle{
              gradient: Gradient {
                  GradientStop { position: 0.0; color: "#00000000" }
                  GradientStop { position: 1.0; color: "#000000" }
              }
          }
      }
      

      gives me:

      /home/tim/build/roda-gcc_11-Debug/renderer/core/.qmltc/MyModule/myitem.cpp: In member function ‘void MyItem_Rectangle::QML_endInit(QQmlEngine*, QV4::ExecutableCompilationUnit*)’:
      /home/tim/build/roda-gcc_11-Debug/renderer/core/.qmltc/MyModule/myitem.cpp:139:22: error: use of deleted function ‘QJSValue::QJSValue(void*)’
        139 |     this->setGradient(o_1);
            |     ~~~~~~~~~~~~~~~~~^~~~~
      In file included from /home/tim/dev/qt6/build_debug/qtbase/include/QtQml/qjsvalue.h:1,
                       from /home/tim/dev/qt6/qtdeclarative/src/qml/jsapi/qjsengine.h:48,
                       from /home/tim/dev/qt6/build_debug/qtbase/include/QtQml/qjsengine.h:1,
                       from /home/tim/dev/qt6/build_debug/qtbase/include/QtQml/QtQml:6,
                       from /home/tim/dev/qt6/build_debug/qtbase/include/QtQuick/QtQuickDepends:5,
                       from /home/tim/dev/qt6/build_debug/qtbase/include/QtQuick/QtQuick:3,
      

        Attachments

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

          Activity

            People

            Assignee:
            agolubev Andrei Golubev
            Reporter:
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes