From 633f26f2d28a9d81afd767b6b4abc307646f9e11 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 27 Nov 2013 16:42:34 +0100 Subject: Fix warning printed when using TabView This fixes the binding loop warning that is printed in any application that makes use of TabView. It was casued by a QTBUG-35038 and a proper fix for that will be posted to the stable branch. Task-number: QTBUG-35134 Change-Id: Ia60c789d9fb8ee662215628fa9733b17cf9be90c Reviewed-by: J-P Nurmi --- src/controls/Private/TabBar.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/controls/Private/TabBar.qml b/src/controls/Private/TabBar.qml index 592ec348..2e374f99 100644 --- a/src/controls/Private/TabBar.qml +++ b/src/controls/Private/TabBar.qml @@ -119,7 +119,10 @@ FocusScope { interactive: false focus: true - width: Math.min(availableWidth, count ? contentWidth : availableWidth) + // Note this will silence the binding loop warnings caused by QTBUG-35038 + // and should be removed when this issue is resolved. + property int contentWidthWorkaround: contentWidth > 0 ? contentWidth: 0 + width: Math.min(availableWidth, count ? contentWidthWorkaround : availableWidth) height: currentItem ? currentItem.height : 0 highlightMoveDuration: 0 -- cgit v1.2.3