aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/basic/DialogButtonBox.qml
diff options
context:
space:
mode:
authorVladimir Belyavsky <belyavskyv@gmail.com>2023-11-26 11:34:00 +0300
committerVladimir Belyavsky <belyavskyv@gmail.com>2023-11-29 09:27:39 +0300
commit510d399bd6e5db32c502c237ea3d8e1a27b43e0d (patch)
tree99ff4bb65f137722df179ccddd2e1f5a8cada229 /src/quickcontrols/basic/DialogButtonBox.qml
parent8dc2e3daf08327c6f70ac7c1c5862f726cbf74e7 (diff)
tst_dialogbuttonbox: fail on warnings
Enable fail on warnings for all tests in init() method. Fix the warning in DialogButtonBox::test_contentItemDeletionOrder() "DialogButtonBox.qml:14: TypeError: Cannot read property 'contentWidth' of null". With fc4ee77116624c784d8c42f2b8e5dbf2f78b6d89 we can use now the optional chaining for this. Also, as a drive-by change, replace 'var' with 'let' Task-number: QTBUG-98718 Change-Id: I9daf41fb76e297f7a1b8114b0e82c60e396ac7b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols/basic/DialogButtonBox.qml')
-rw-r--r--src/quickcontrols/basic/DialogButtonBox.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickcontrols/basic/DialogButtonBox.qml b/src/quickcontrols/basic/DialogButtonBox.qml
index d28c77604b..dddbf146f5 100644
--- a/src/quickcontrols/basic/DialogButtonBox.qml
+++ b/src/quickcontrols/basic/DialogButtonBox.qml
@@ -11,7 +11,7 @@ T.DialogButtonBox {
(control.count === 1 ? implicitContentWidth * 2 : implicitContentWidth) + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
- contentWidth: (contentItem as ListView).contentWidth // QTBUG-111283 blocks optional chaining + nullish coalescing
+ contentWidth: (contentItem as ListView)?.contentWidth
spacing: 1
padding: 12