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

qmlcompiler generated code not compatible with QT_NO_CAST_FROM_ASCII

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.1, 6.9.0 FF, 6.9
    • 6.8
    • QML: Compiler
    • None
    • Linux/Yocto, macOS
    • 95b039747 (dev), 37c525c6a (dev), f1b23818a (6.8), 4e5840ba0 (6.8), 12e128402 (dev), bd6824a0e (6.8)

    Description

      This may be fixed with: QTBUG-129797 though I'm getting a different error to that ticket so thought I'd file

      With a basic new QtQuick project once I define:
      `add_compile_definitions(QT_NO_CAST_FROM_ASCII=1)`

      I get errors for every qml property like below:

      /.qmltc/apptest2/main.cpp:34:29: error: calling a private constructor of class 'QString'
          initializedCache.insert("screen");
                                  ^
      
      /Qt/6.8.0/macos/lib/QtCore.framework/Headers/qstring.h:1014:5: note: declared private here
          QString(const char *ch);
          ^ 

      Main.qml is just:

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      } 

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            joecresswell Joseph Cresswell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes