Add a hidden XandYAxis enum value
authorAlan Alpert <alan.alpert@nokia.com>
Thu, 1 Mar 2012 10:09:52 +0000 (20:09 +1000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 15 Dec 2012 21:59:32 +0000 (22:59 +0100)
For Qt 5 XandYAxis is being renamed to XAndYAxis to more consistently
follow capitalization rules. Add an undocumented XandYAxis variable to
ease porting.

Change-Id: Id9e41dd5578373f5f557937da889a9326ff12e53
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
19 files changed:
examples/quick/animation/behaviors/wigglytext.qml
examples/quick/mousearea/mousearea.qml
examples/quick/touchinteraction/flickable/content/Panel.qml
src/imports/qtquick2/plugins.qmltypes
src/quick/items/qquickmousearea.cpp
src/quick/items/qquickmousearea_p.h
src/quick/items/qquickpincharea.cpp
src/quick/items/qquickpincharea_p.h
tests/auto/quick/qquickmousearea/data/changeAxis.qml
tests/auto/quick/qquickmousearea/data/dragging.qml
tests/auto/quick/qquickmousearea/data/dragproperties.qml
tests/auto/quick/qquickmousearea/data/dragreset.qml
tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp
tests/auto/quick/qquickpincharea/data/pinchproperties.qml
tests/auto/quick/qquickpincharea/data/transformedPinchArea.qml
tests/auto/quick/qquickpincharea/tst_qquickpincharea.cpp
tests/benchmarks/qml/holistic/data/largeTargets/mousearea-example.qml
tests/manual/scenegraph_lancelot/data/images/transform.qml
tests/manual/scenegraph_lancelot/data/shaders/source/rect.qml

index 13d04d5..1bafebc 100644 (file)
@@ -96,7 +96,7 @@ Rectangle {
 
             MouseArea {
                 anchors.fill: parent
-                drag.target: letter; drag.axis: Drag.XandYAxis
+                drag.target: letter; drag.axis: Drag.XAndYAxis
                 onPressed: letter.color = "#dddddd"
                 onReleased: letter.color = "#999999"
             }
index fb912af..efadfcf 100644 (file)
@@ -152,7 +152,7 @@ Rectangle {
             anchors.fill: parent
             //! [drag]
             drag.target: blueSquare
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: box.width - parent.width
             drag.minimumY: 0
index 2918978..6932fca 100644 (file)
@@ -111,7 +111,7 @@ Component {
                             id: mouse
                             anchors.fill: parent
                             drag.target: stickyPage
-                            drag.axis: Drag.XandYAxis
+                            drag.axis: Drag.XAndYAxis
                             drag.minimumY: 0
                             drag.maximumY: page.height - 80
                             drag.minimumX: 100
index 12ea933..e538162 100644 (file)
@@ -880,7 +880,7 @@ Module {
             values: {
                 "XAxis": 1,
                 "YAxis": 2,
-                "XandYAxis": 3
+                "XAndYAxis": 3
             }
         }
         Property { name: "target"; type: "QQuickItem"; isPointer: true }
@@ -2337,7 +2337,7 @@ Module {
                 "NoDrag": 0,
                 "XAxis": 1,
                 "YAxis": 2,
-                "XandYAxis": 3
+                "XAndYAxis": 3
             }
         }
         Property { name: "target"; type: "QQuickItem"; isPointer: true }
index ad3f4fa..fd01c80 100644 (file)
@@ -64,7 +64,7 @@ static const int PressAndHoldDelay = 800;
 #ifndef QT_NO_DRAGANDDROP
 
 QQuickDrag::QQuickDrag(QObject *parent)
-: QObject(parent), _target(0), _axis(XandYAxis), _xmin(-FLT_MAX),
+: QObject(parent), _target(0), _axis(XAndYAxis), _xmin(-FLT_MAX),
 _xmax(FLT_MAX), _ymin(-FLT_MAX), _ymax(FLT_MAX), _active(false), _filterChildren(false)
 {
 }
@@ -1331,7 +1331,7 @@ void QQuickMouseArea::setCursorShape(Qt::CursorShape shape)
     \list
     \li \c drag.target specifies the id of the item to drag.
     \li \c drag.active specifies if the target item is currently being dragged.
-    \li \c drag.axis specifies whether dragging can be done horizontally (\c Drag.XAxis), vertically (\c Drag.YAxis), or both (\c Drag.XandYAxis)
+    \li \c drag.axis specifies whether dragging can be done horizontally (\c Drag.XAxis), vertically (\c Drag.YAxis), or both (\c Drag.XAndYAxis)
     \li \c drag.minimum and \c drag.maximum limit how far the target can be dragged along the corresponding axes.
     \endlist
 
index b095ba5..eb5bddf 100644 (file)
@@ -78,7 +78,7 @@ public:
     void setTarget(QQuickItem *target);
     void resetTarget();
 
-    enum Axis { XAxis=0x01, YAxis=0x02, XandYAxis=0x03 };
+    enum Axis { XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis };
     Axis axis() const;
     void setAxis(Axis);
 
index 5dcea62..a2f0376 100644 (file)
@@ -239,7 +239,7 @@ QQuickPinchAreaPrivate::~QQuickPinchAreaPrivate()
     \li \c pinch.active specifies if the target item is currently being dragged.
     \li \c pinch.minimumScale and \c pinch.maximumScale limit the range of the Item::scale property.
     \li \c pinch.minimumRotation and \c pinch.maximumRotation limit the range of the Item::rotation property.
-    \li \c pinch.dragAxis specifies whether dragging in not allowed (\c Pinch.NoDrag), can be done horizontally (\c Pinch.XAxis), vertically (\c Pinch.YAxis), or both (\c Pinch.XandYAxis)
+    \li \c pinch.dragAxis specifies whether dragging in not allowed (\c Pinch.NoDrag), can be done horizontally (\c Pinch.XAxis), vertically (\c Pinch.YAxis), or both (\c Pinch.XAndYAxis)
     \li \c pinch.minimum and \c pinch.maximum limit how far the target can be dragged along the corresponding axes.
     \endlist
 */
index 435d3ec..f3687e0 100644 (file)
@@ -112,7 +112,7 @@ public:
         emit maximumRotationChanged();
     }
 
-    enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XandYAxis=0x03 };
+    enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis };
     Axis axis() const { return m_axis; }
     void setAxis(Axis a) {
         if (a == m_axis)
index cf791df..4463f46 100644 (file)
@@ -16,7 +16,7 @@ Rectangle {
             objectName: "mouseregion"
             anchors.fill: parent
             drag.target: blackRect
-            drag.axis: blackRect.x <= 75 ? Drag.XandYAxis : Drag.YAxis
+            drag.axis: blackRect.x <= 75 ? Drag.XAndYAxis : Drag.YAxis
          }
      }
  }
index d9b6ac4..4e0dbe6 100644 (file)
@@ -18,7 +18,7 @@ Rectangle {
             objectName: "mouseregion"
             anchors.fill: parent
             drag.target: blackRect
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: whiteRect.width-blackRect.width
             drag.minimumY: 0
index 421dfe2..d8d7b3b 100644 (file)
@@ -18,7 +18,7 @@ Rectangle {
             objectName: "mouseregion"
             anchors.fill: parent
             drag.target: blackRect
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: whiteRect.width-blackRect.width
             drag.minimumY: 0
index d7949f9..3259dcf 100644 (file)
@@ -18,7 +18,7 @@ Rectangle {
             objectName: "mouseregion"
             anchors.fill: parent
             drag.target: haveTarget ? blackRect : undefined
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: whiteRect.width-blackRect.width
             drag.minimumY: 0
index 3c89ad4..d6b501c 100644 (file)
@@ -150,7 +150,7 @@ void tst_QQuickMouseArea::dragProperties()
     QCOMPARE(targetSpy.count(),1);
 
     // axis
-    QCOMPARE(drag->axis(), QQuickDrag::XandYAxis);
+    QCOMPARE(drag->axis(), QQuickDrag::XAndYAxis);
     QSignalSpy axisSpy(drag, SIGNAL(axisChanged()));
     drag->setAxis(QQuickDrag::XAxis);
     QCOMPARE(drag->axis(), QQuickDrag::XAxis);
@@ -1344,7 +1344,7 @@ void tst_QQuickMouseArea::changeAxis()
     QTRY_VERIFY(drag->active());
     QCOMPARE(blackRect->x(), 72.0);
     QCOMPARE(blackRect->y(), 72.0);
-    QCOMPARE(drag->axis(), QQuickDrag::XandYAxis);
+    QCOMPARE(drag->axis(), QQuickDrag::XAndYAxis);
 
     /* When blackRect.x becomes bigger than 75, the drag axis is changed to
      * Drag.YAxis by the QML code. Verify that this happens, and that the drag
index 6665e2f..37d706f 100644 (file)
@@ -22,7 +22,7 @@ Rectangle {
             objectName: "pincharea"
             anchors.fill: parent
             pinch.target: blackRect
-            pinch.dragAxis: Drag.XandYAxis
+            pinch.dragAxis: Drag.XAndYAxis
             pinch.minimumX: 0
             pinch.maximumX: whiteRect.width-blackRect.width
             pinch.minimumY: 0
index 7d5d88a..292838e 100644 (file)
@@ -24,7 +24,7 @@ Rectangle {
                 property bool pinching: false
 
                 pinch.target: rect
-                pinch.dragAxis: Drag.XandYAxis
+                pinch.dragAxis: Drag.XAndYAxis
                 onPinchStarted: pinching = true
                 onPinchFinished: pinching = false
             }
index b314706..4ba9e50 100644 (file)
@@ -108,7 +108,7 @@ void tst_QQuickPinchArea::pinchProperties()
     QCOMPARE(targetSpy.count(),1);
 
     // axis
-    QCOMPARE(pinch->axis(), QQuickPinch::XandYAxis);
+    QCOMPARE(pinch->axis(), QQuickPinch::XAndYAxis);
     QSignalSpy axisSpy(pinch, SIGNAL(dragAxisChanged()));
     pinch->setAxis(QQuickPinch::XAxis);
     QCOMPARE(pinch->axis(), QQuickPinch::XAxis);
index a865ae4..9cd2236 100644 (file)
@@ -90,7 +90,7 @@ Rectangle {
         MouseArea {
             anchors.fill: parent
             drag.target: blueSquare
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: box.width - parent.width
             drag.minimumY: 0
index be711ba..5a02724 100644 (file)
@@ -24,7 +24,7 @@ Rectangle {
             MouseArea {
                 anchors.fill: parent
                 drag.target: parent
-                drag.axis: Drag.XandYAxis
+                drag.axis: Drag.XAndYAxis
                 drag.minimumX: 0
                 drag.maximumX: wooohooo.width - parent.width
                 drag.minimumY: 0
index 46fa6f5..e2a3ca7 100644 (file)
@@ -44,7 +44,7 @@ Item {
         MouseArea {
             anchors.fill: parent
             drag.target: parent
-            drag.axis: Drag.XandYAxis
+            drag.axis: Drag.XAndYAxis
             drag.minimumX: 0
             drag.maximumX: parent.parent.width - width
             drag.minimumY: 0