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

QMLLINT Fix Suggestion for Quick.layout Positioning Misleading for LLMs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.10
    • 6.9
    • QML: Tooling
    • None

    Description

      When running QML lint on code like in the attachment, then linter returns the following fix suggestion: "Detected height on an item that is managed by a layout. This is undefined behavior; use implictHeight or Layout.preferredHeight instead."

      When feeding this fix suggestion to a Large Language Model like Claude 3.7 Sonnet, then the LLM will replace the height property with the implicitHeight property because it doesn't recognise that implicitHeight is a read-only property. The fix suggestion should be explicit about how to use the alternative suggestions such as "Use implicitHeight of the related object as value for the height property or use Layout.preferredHeight as property instead"

      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
            peter.schneider Peter Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes