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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 6.4
    • Fix Version/s: 6.4
    • Component/s: QML: Tooling
    • Labels:

      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

              Assignee:
              qtqmlteam Qt Qml Team User
              Reporter:
              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