From aa4ddfd8443f07badc0899d835027e46c6e0dfd8 Mon Sep 17 00:00:00 2001 From: J-P Nurmi <jpnurmi@digia.com> Date: Mon, 24 Jun 2013 14:05:56 +0200 Subject: [PATCH] Adapt to Qt.platform.os rename ("mac" -> "osx") Change-Id: I089a01bee10b92f85dcdd338c695a3b796b0ecd1 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> --- examples/quick/controls/gallery/content/ModelView.qml | 2 +- examples/quick/controls/gallery/main.qml | 2 +- examples/quick/controls/tableview/main.qml | 2 +- src/controls/TableView.qml | 2 +- tests/auto/controls/data/tst_combobox.qml | 10 +++++----- tests/auto/controls/data/tst_shortcuts.qml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/quick/controls/gallery/content/ModelView.qml b/examples/quick/controls/gallery/content/ModelView.qml index e6a6040fb..483d99ee4 100644 --- a/examples/quick/controls/gallery/content/ModelView.qml +++ b/examples/quick/controls/gallery/content/ModelView.qml @@ -51,7 +51,7 @@ Item { width: 600 height: 300 anchors.fill: parent - anchors.margins: Qt.platform.os === "mac" ? 12 : 6 + anchors.margins: Qt.platform.os === "osx" ? 12 : 6 // XmlListModel { // id: flickerModel diff --git a/examples/quick/controls/gallery/main.qml b/examples/quick/controls/gallery/main.qml index 8ea3cf9e8..ec00627b8 100644 --- a/examples/quick/controls/gallery/main.qml +++ b/examples/quick/controls/gallery/main.qml @@ -228,7 +228,7 @@ ApplicationWindow { enabled: enabledCheck.checked tabPosition: controlPage.item ? controlPage.item.tabPosition : Qt.TopEdge anchors.fill: parent - anchors.margins: Qt.platform.os === "mac" ? 12 : 2 + anchors.margins: Qt.platform.os === "osx" ? 12 : 2 Tab { id: controlPage diff --git a/examples/quick/controls/tableview/main.qml b/examples/quick/controls/tableview/main.qml index 3ecf5ddb3..1a9246f83 100644 --- a/examples/quick/controls/tableview/main.qml +++ b/examples/quick/controls/tableview/main.qml @@ -129,7 +129,7 @@ Window { focus:true enabled: enabledCheck.checked - property int margins: Qt.platform.os === "mac" ? 16 : 0 + property int margins: Qt.platform.os === "osx" ? 16 : 0 height: parent.height - 34 anchors.right: parent.right diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 6f05d605b..b02a49c03 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -393,7 +393,7 @@ ScrollView { implicitHeight: 150 frameVisible: true - __scrollBarTopMargin: Qt.platform.os === "mac" ? headerrow.height : 0 + __scrollBarTopMargin: Qt.platform.os === "osx" ? headerrow.height : 0 __viewTopMargin: headerrow.height /*! \internal */ diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index c36218a31..4cb573511 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -217,20 +217,20 @@ TestCase { } function test_activeFocusOnPress(){ - if (Qt.platform.os === "mac") + if (Qt.platform.os === "osx") skip("When the menu pops up on OS X, it does not return and the test fails after time out") var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.0 ; ComboBox { model: 4 }', container, ''); comboBox.activeFocusOnPress = false verify(!comboBox.activeFocus) - if (Qt.platform.os === "mac") // on mac when the menu open, the __popup function does not return + if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return timer.start() else // two mouse clicks to open and close the popup menu mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) verify(!comboBox.activeFocus) comboBox.activeFocusOnPress = true - if (Qt.platform.os === "mac") // on mac when the menu open, the __popup function does not return + if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return timer.start() else // two mouse clicks to open and close the popup menu mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) @@ -240,7 +240,7 @@ TestCase { } function test_spaceKey(){ - if (Qt.platform.os === "mac") + if (Qt.platform.os === "osx") skip("When the menu pops up on OS X, it does not return and the test fails after time out") var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.0 ; ComboBox { model: 4 }', container, ''); @@ -259,7 +259,7 @@ TestCase { } function test_currentIndexInMenu() { - if (Qt.platform.os === "mac") + if (Qt.platform.os === "osx") skip("When the menu pops up on OS X, it does not return and the test fails after time out") var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.0 ; ComboBox { model: 4 }', container, ''); diff --git a/tests/auto/controls/data/tst_shortcuts.qml b/tests/auto/controls/data/tst_shortcuts.qml index c0a668d4c..b28d24a9b 100644 --- a/tests/auto/controls/data/tst_shortcuts.qml +++ b/tests/auto/controls/data/tst_shortcuts.qml @@ -78,7 +78,7 @@ TestCase { { key: Qt.Key_D, modifier: Qt.AltModifier, expected: "alt d pressed" }, { key: Qt.Key_T, modifier: Qt.NoModifier, expected: "no key press" }, // on mac we don't have mnemonics - { key: Qt.Key_T, modifier: Qt.AltModifier, expected: Qt.platform.os === "mac" ? "no key press" : "alt t pressed" }, + { key: Qt.Key_T, modifier: Qt.AltModifier, expected: Qt.platform.os === "osx" ? "no key press" : "alt t pressed" }, ] } -- GitLab