Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.8, 6.8.1, 6.9.0 Beta1
-
None
-
4ae701226 (dev), 3dec3fc10 (6.9), 4a4299c4f (6.8), b1bd66155 (tqtc/lts-6.5)
Description
We force qmllint on our files and tried it with Qt 6.9 beta 1 now. So run in some new warnings but it seems that this is a false positive warning. We stripped down to a little example.
Of course a Column in a ColumnLayout isn't the best but it is just compatbility layer for us and shows the problem with the default property.
Warning: main.qml:8:14: Detected width on an item that is managed by a layout. This is undefined behavior; use implicitWidth or Layout.preferredWidth instead. [Quick.layout-positioning] width: parent.width
import QtQuick import QtQuick.Layouts GPane { Layout.alignment: Qt.AlignHCenter Text { width: parent.width } }
import QtQuick import QtQuick.Layouts ColumnLayout { default property alias paneData: content.data Column { id: content } }
Attachments
For Gerrit Dashboard: QTBUG-132805 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
617285,2 | QuickLintPlugin: Guard against deceptive default properties | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
617572,3 | QuickLintPlugin: Guard against deceptive default properties | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
618072,2 | QuickLintPlugin: Guard against deceptive default properties | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
618342,3 | QuickLintPlugin: Guard against deceptive default properties | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |