Coding style corrections

This commit is contained in:
Cristian Luis Duarte 2018-03-13 15:56:13 -03:00
parent b8c0f4d686
commit a3811c2844
2 changed files with 10 additions and 17 deletions

View file

@ -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);
}

View file

@ -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);