From 80f29bd3f6147dfb44adc0ac91a5a6529111bec2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 3 Mar 2016 14:36:57 -0800 Subject: QML UI: brute force around Qt 5.6.0 bug With the current release candidate of Qt 5.6.0 we get into an infinite recursion of the grid layout engine. This had happened before (prior to the 5.6 beta) and it appeared that setting the maximum width of the columns was sufficient to fix this. But with the RC even that isn't sufficient, so now we give up on having QML figure out the best possible column width and hard code both preferred and maximum width to the same, predefined values. That's a total shame, but at least now we can build against Qt 5.6 without infinite recursions and crashes. Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveDetailsView.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'qt-mobile') diff --git a/qt-mobile/qml/DiveDetailsView.qml b/qt-mobile/qml/DiveDetailsView.qml index c2c6648f2..ea80cdc42 100644 --- a/qt-mobile/qml/DiveDetailsView.qml +++ b/qt-mobile/qml/DiveDetailsView.qml @@ -148,6 +148,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col1Width + Layout.preferredWidth: detailsView.col1Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -155,6 +156,7 @@ Item { text: dive.suit wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col2Width + Layout.preferredWidth: detailsView.col2Width } MobileComponents.Label { @@ -162,6 +164,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col3Width + Layout.preferredWidth: detailsView.col3Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -169,6 +172,7 @@ Item { text: dive.airTemp wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col4Width + Layout.preferredWidth: detailsView.col4Width } MobileComponents.Label { @@ -176,6 +180,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col1Width + Layout.preferredWidth: detailsView.col1Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -183,6 +188,7 @@ Item { text: dive.getCylinder wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col2Width + Layout.preferredWidth: detailsView.col2Width } MobileComponents.Label { @@ -190,6 +196,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col3Width + Layout.preferredWidth: detailsView.col3Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -197,6 +204,7 @@ Item { text: dive.waterTemp wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col4Width + Layout.preferredWidth: detailsView.col4Width } MobileComponents.Label { @@ -204,6 +212,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col1Width + Layout.preferredWidth: detailsView.col1Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -211,6 +220,7 @@ Item { text: dive.divemaster wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col2Width + Layout.preferredWidth: detailsView.col2Width } MobileComponents.Label { @@ -218,6 +228,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col3Width + Layout.preferredWidth: detailsView.col3Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -225,6 +236,7 @@ Item { text: dive.sumWeight wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col4Width + Layout.preferredWidth: detailsView.col4Width } MobileComponents.Label { @@ -232,6 +244,7 @@ Item { wrapMode: Text.WrapAtWordBoundaryOrAnywhere opacity: 0.6 Layout.maximumWidth: detailsView.col1Width + Layout.preferredWidth: detailsView.col1Width Layout.alignment: Qt.AlignRight } MobileComponents.Label { @@ -240,6 +253,7 @@ Item { Layout.columnSpan: 3 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col2Width + detailsView.col3Width + detailsView.col4Width + Layout.preferredWidth: detailsView.col2Width + detailsView.col3Width + detailsView.col4Width } MobileComponents.Heading { -- cgit v1.2.3-70-g09d2