From 5a453c9995e706e33f0e92f5c7bb2213c466726d Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Tue, 6 Sep 2011 13:06:50 +0200
Subject: [PATCH] Fix property type mismatch in Qt Quick Designer

* GridView.keyNavigationWraps
* ListView.keyNavigationWraps

Task-number: QTCREATORBUG-5776

Change-Id: I6d18650a6be83bdeb1bb6f38749d0bae79e52e24
Merge-request: 365
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/4249
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
---
 .../propertyeditor/Qt/GridViewSpecifics.qml   | 20 +++++++++++--------
 .../propertyeditor/Qt/ListViewSpecifics.qml   | 20 +++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/GridViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/GridViewSpecifics.qml
index aeedc767860..eb38400720b 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/GridViewSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/GridViewSpecifics.qml
@@ -89,14 +89,18 @@ QWidget {
                     }
                 } //QWidget
 
-                IntEditor {
-                    backendValue: backendValues.keyNavigationWraps
-                    caption: qsTr("Resize wraps")
-                    toolTip: qsTr("Determines whether the grid wraps key navigation.")
-                    baseStateFlag: isBaseState;
-                    step: 1;
-                    minimumValue: 0;
-                    maximumValue: 1000;
+                QWidget {
+                    layout: HorizontalLayout {
+                        Label {
+                            text: qsTr("Navigation wraps")
+                        }
+                        CheckBox {
+                            backendValue: backendValues.keyNavigationWraps
+                            toolTip: qsTr("Determines whether the grid wraps key navigation.")
+                            baseStateFlag: isBaseState;
+                            checkable: True
+                        }
+                    }
                 }
                 //                Qt namespace enums not supported by the rewriter
                 //                QWidget {
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml
index 9ad5901e036..59ae5e9c7a5 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ListViewSpecifics.qml
@@ -56,14 +56,18 @@ QWidget {
                     minimumValue: 0;
                     maximumValue: 1000;
                 }
-                IntEditor {
-                    backendValue: backendValues.keyNavigationWraps
-                    caption: qsTr("Navigation wraps")
-                    toolTip: qsTr("Determines whether the grid wraps key navigation.")
-                    baseStateFlag: isBaseState;
-                    step: 1;
-                    minimumValue: 0;
-                    maximumValue: 1000;
+                QWidget {
+                    layout: HorizontalLayout {
+                        Label {
+                            text: qsTr("Navigation wraps")
+                        }
+                        CheckBox {
+                            backendValue: backendValues.keyNavigationWraps
+                            toolTip: qsTr("Determines whether the grid wraps key navigation.")
+                            baseStateFlag: isBaseState;
+                            checkable: True
+                        }
+                    }
                 }
                 //                Qt namespace enums not supported by the rewriter
                 //                QWidget {
-- 
GitLab