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

Weird compiler warning message when using unresolved function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.8
    • 6.7
    • QML: Compiler
    • None
    • Fedora 40, KDE Plasma

    Description

      Consider the following QML code

      import QtQuick
      import QtQuick.Controls as QQC2
      
      Window {
          QQC2.Label {
              text: i18n("Display Style")
          }
      } 

      Compiling with qmlcachegen in verbose mode gives (among others) the following warning

      > Warning: Main.qml:6:9: Cannot resolve property type  for binding on text. [compiler]

      note the double space between type and for. It appears that there's supposed to be a type name there, but there isn't.

      i18n() in this case is a KDE function injected via setContextObject, so not visible to the compiler. Getting that to work properly is a whole other topic.

      qtdeclarative commit b75f34458f6060385b3cdcc46ce8e8e87f661251

      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
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes