From a3811c2844fd05039d54449c3b82312ca1ded8b9 Mon Sep 17 00:00:00 2001 From: Cristian Luis Duarte Date: Tue, 13 Mar 2018 15:56:13 -0300 Subject: [PATCH] Coding style corrections --- .../resources/qml/+android/LoginDialog.qml | 4 ++-- .../TouchscreenVirtualPadDevice.cpp | 23 +++++++------------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/interface/resources/qml/+android/LoginDialog.qml b/interface/resources/qml/+android/LoginDialog.qml index 7753e9937d..567cca9bcf 100644 --- a/interface/resources/qml/+android/LoginDialog.qml +++ b/interface/resources/qml/+android/LoginDialog.qml @@ -53,8 +53,8 @@ ModalWindow { Component.onCompleted: { this.anchors.centerIn = undefined; - this.y=150; - this.x=(parent.width - this.width)/2; + this.y = 150; + this.x = (parent.width - this.width) / 2; Controller.setVPadHidden(true); } diff --git a/libraries/input-plugins/src/input-plugins/TouchscreenVirtualPadDevice.cpp b/libraries/input-plugins/src/input-plugins/TouchscreenVirtualPadDevice.cpp index f9a712a70d..dad311ef27 100644 --- a/libraries/input-plugins/src/input-plugins/TouchscreenVirtualPadDevice.cpp +++ b/libraries/input-plugins/src/input-plugins/TouchscreenVirtualPadDevice.cpp @@ -282,36 +282,29 @@ void TouchscreenVirtualPadDevice::touchUpdateEvent(const QTouchEvent* event) { // valid if it's an ongoing touch moveTouchFound = true; moveTouchUpdate(thisPoint); - thisPointConsumed = true; + continue; } - if (thisPointConsumed) continue; - if (!viewTouchFound && _viewHasValidTouch && _viewCurrentTouchId == thisPointId) { // valid if it's an ongoing touch viewTouchFound = true; viewTouchUpdate(thisPoint); - thisPointConsumed = true; + continue; } - if (thisPointConsumed) continue; - - if (!moveTouchFound && idxMoveStartingPointCandidate==-1 && moveTouchBeginIsValid(thisPoint) && + if (!moveTouchFound && idxMoveStartingPointCandidate == -1 && moveTouchBeginIsValid(thisPoint) && (!_unusedTouches.count(thisPointId) || _unusedTouches[thisPointId] == MOVE )) { idxMoveStartingPointCandidate = i; - thisPointConsumed = true; + continue; } - if (thisPointConsumed) continue; - - if (!viewTouchFound && idxViewStartingPointCandidate==-1 && viewTouchBeginIsValid(thisPoint) && + if (!viewTouchFound && idxViewStartingPointCandidate == -1 && viewTouchBeginIsValid(thisPoint) && (!_unusedTouches.count(thisPointId) || _unusedTouches[thisPointId] == VIEW )) { idxViewStartingPointCandidate = i; thisPointConsumed = true; + continue; } - if (thisPointConsumed) continue; - if (moveTouchBeginIsValid(thisPoint)) { unusedTouchesInEvent[thisPointId] = MOVE; } else if (viewTouchBeginIsValid(thisPoint)) { @@ -323,7 +316,7 @@ void TouchscreenVirtualPadDevice::touchUpdateEvent(const QTouchEvent* event) { processUnusedTouches(unusedTouchesInEvent); if (!moveTouchFound) { - if (idxMoveStartingPointCandidate!=-1) { + if (idxMoveStartingPointCandidate != -1) { _moveCurrentTouchId = tPoints[idxMoveStartingPointCandidate].id(); _unusedTouches.erase(_moveCurrentTouchId); moveTouchBegin(thisPoint); @@ -332,7 +325,7 @@ void TouchscreenVirtualPadDevice::touchUpdateEvent(const QTouchEvent* event) { } } if (!viewTouchFound) { - if (idxViewStartingPointCandidate!=-1) { + if (idxViewStartingPointCandidate != -1) { _viewCurrentTouchId = tPoints[idxViewStartingPointCandidate].id(); _unusedTouches.erase(_viewCurrentTouchId); viewTouchBegin(thisPoint);