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

qsTr + arg: Property "arg" not found on type "void"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.4
    • 6.4
    • QML: Tooling

    Description

      I built qmllint from (qtdeclarative 9883b04326660b606857c852a9059e8b50483a76).
      And for some reason qmllint thinks that qsTr return void instead of string:

      import QtQuick 2.15
      
      Item {
              id: myItem
              property string x: "aaa"
              property string y: qsTr("Some text %1").arg(myItem.x) 
      
      }
      
      ❯ /usr/local/qt6_tools/bin/qmllint Test.qml 
      Warning: Test.qml:6:42: Property "arg" not found on type "void"
              property string y: qsTr("Some text %1").arg(myItem.x) 
                                                      ^^^
      

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              evgeniy_dushistov evgeniy_dushistov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes