From a1b42f95a711f8d8fb87d79ad04eee0a433749ed Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 28 Aug 2017 16:23:20 +0200 Subject: rename TapHandler.isPressed property to pressed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is for the sake of convention. Unfortunately (and the reason it wasn't done this way at the outset), it may prevent us from ever having a signal called "pressed" in this handler or its base class. Change-Id: Iafa117410e0e33562290b87df59bc8c0085c217d Reviewed-by: Jan Arve Sæther --- tests/manual/pointer/content/MultiButton.qml | 4 ++-- tests/manual/pointer/content/Slider.qml | 4 ++-- tests/manual/pointer/content/TapHandlerButton.qml | 2 +- tests/manual/pointer/tapHandler.qml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/manual') diff --git a/tests/manual/pointer/content/MultiButton.qml b/tests/manual/pointer/content/MultiButton.qml index 4a737dc9b0..fec8462ea0 100644 --- a/tests/manual/pointer/content/MultiButton.qml +++ b/tests/manual/pointer/content/MultiButton.qml @@ -44,7 +44,7 @@ import Qt.labs.handlers 1.0 Rectangle { id: root property alias label: label.text - property alias pressed: tap.isPressed + property alias pressed: tap.pressed property bool checked: false property alias gesturePolicy: tap.gesturePolicy signal tapped @@ -53,7 +53,7 @@ Rectangle { border.color: "#9f9d9a"; border.width: 1; radius: height / 4; antialiasing: true gradient: Gradient { - GradientStop { position: 0.0; color: tap.isPressed ? "#b8b5b2" : "#efebe7" } + GradientStop { position: 0.0; color: tap.pressed ? "#b8b5b2" : "#efebe7" } GradientStop { position: 1.0; color: "#b8b5b2" } } diff --git a/tests/manual/pointer/content/Slider.qml b/tests/manual/pointer/content/Slider.qml index 809e4c5f1c..d38805023a 100644 --- a/tests/manual/pointer/content/Slider.qml +++ b/tests/manual/pointer/content/Slider.qml @@ -47,7 +47,7 @@ Item { property int maximumValue: 99 property alias label: label.text property alias tapEnabled: tap.enabled - property alias pressed: tap.isPressed + property alias pressed: tap.pressed signal tapped DragHandler { @@ -82,7 +82,7 @@ Item { anchors.horizontalCenterOffset: 1 radius: 5 color: "#4400FFFF" - opacity: tap.isPressed || tapFlash.running ? 1 : 0 + opacity: tap.pressed || tapFlash.running ? 1 : 0 FlashAnimation on visible { id: tapFlash } diff --git a/tests/manual/pointer/content/TapHandlerButton.qml b/tests/manual/pointer/content/TapHandlerButton.qml index e40c539686..6724ea896d 100644 --- a/tests/manual/pointer/content/TapHandlerButton.qml +++ b/tests/manual/pointer/content/TapHandlerButton.qml @@ -48,7 +48,7 @@ Item { property alias text: buttonLabel.text property alias label: buttonLabel signal clicked - property alias pressed: th.isPressed + property alias pressed: th.pressed implicitHeight: Math.max(Screen.pixelDensity * 7, buttonLabel.implicitHeight * 1.2) implicitWidth: Math.max(Screen.pixelDensity * 11, buttonLabel.implicitWidth * 1.3) height: implicitHeight diff --git a/tests/manual/pointer/tapHandler.qml b/tests/manual/pointer/tapHandler.qml index 5dac99a899..fcd7dfd443 100644 --- a/tests/manual/pointer/tapHandler.qml +++ b/tests/manual/pointer/tapHandler.qml @@ -50,7 +50,7 @@ Item { id: rect anchors.fill: parent; anchors.margins: 40 border.width: 3; border.color: "transparent" - color: handler.isPressed ? "lightsteelblue" : "darkgrey" + color: handler.pressed ? "lightsteelblue" : "darkgrey" TapHandler { id: handler @@ -111,7 +111,7 @@ Item { Rectangle { id: expandingCircle radius: handler.timeHeld * 100 - visible: radius > 0 && handler.isPressed + visible: radius > 0 && handler.pressed border.width: 3 border.color: borderBlink.blinkColor color: "transparent" -- cgit v1.2.3