anchors.mirrored should not exist in QtQuick 2
authorMartin Jones <martin.jones@nokia.com>
Fri, 29 Jun 2012 03:08:41 +0000 (13:08 +1000)
committerQt by Nokia <qt-info@nokia.com>
Sun, 1 Jul 2012 23:37:38 +0000 (01:37 +0200)
anchors.mirrored was removed from QtQuick 1.1 before release, however
QtQuick 2 was branched before it was removed, so it currently exists in
QtQuick 2.

Task-number: QTBUG-26369
Change-Id: Iab85f66f6c5f0ebadc5962cc6962cec15203d55d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/quick/items/qquickanchors_p.h
src/quick/items/qquickitem.cpp
tests/auto/quick/qquickanchors/tst_qquickanchors.cpp

index 7167857..3fb3a7b 100644 (file)
@@ -76,7 +76,6 @@ class Q_QUICK_PRIVATE_EXPORT QQuickAnchors : public QObject
     Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
     Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
     Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
-    Q_PROPERTY(bool mirrored READ mirrored NOTIFY mirroredChanged)
     Q_PROPERTY(bool alignWhenCentered READ alignWhenCentered WRITE setAlignWhenCentered NOTIFY centerAlignedChanged)
 
 public:
@@ -184,7 +183,6 @@ Q_SIGNALS:
     void verticalCenterOffsetChanged();
     void horizontalCenterOffsetChanged();
     void baselineOffsetChanged();
-    void mirroredChanged();
     void centerAlignedChanged();
 
 private:
index 2357c5f..b83328a 100644 (file)
@@ -1619,7 +1619,6 @@ void QQuickItemPrivate::setLayoutMirror(bool mirror)
             anchor_d->fillChanged();
             anchor_d->centerInChanged();
             anchor_d->updateHorizontalAnchors();
-            emit _anchors->mirroredChanged();
         }
         mirrorChange();
         if (extra.isAllocated() && extra->layoutDirectionAttached) {
@@ -2851,7 +2850,6 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
   \qmlproperty real QtQuick2::Item::anchors.verticalCenterOffset
   \qmlproperty real QtQuick2::Item::anchors.baselineOffset
 
-  \qmlproperty bool QtQuick2::Item::anchors.mirrored
   \qmlproperty bool QtQuick2::Item::anchors.alignWhenCentered
 
   Anchors provide a way to position an item by specifying its
@@ -2911,8 +2909,6 @@ void QQuickItemPrivate::transform_clear(QQmlListProperty<QQuickTransform> *prop)
 
   To clear an anchor value, set it to \c undefined.
 
-  \c anchors.mirrored returns true it the layout has been \l {LayoutMirroring}{mirrored}.
-
   \c anchors.alignWhenCentered (default true) forces centered anchors to align to a
   whole pixel, i.e. if the item being centered has an odd width/height the item
   will be positioned on a whole pixel rather than being placed on a half-pixel.
index b91f8f1..45c00e0 100644 (file)
@@ -181,7 +181,7 @@ void tst_qquickanchors::basicAnchorsRTL()
 
     QQuickItem* rootItem = qobject_cast<QQuickItem*>(view->rootObject());
     foreach (QObject *child, rootItem->children()) {
-        bool mirrored = QQuickItemPrivate::get(qobject_cast<QQuickItem*>(child))->anchors()->property("mirrored").toBool();
+        bool mirrored = QQuickItemPrivate::get(qobject_cast<QQuickItem*>(child))->anchors()->mirrored();
         QCOMPARE(mirrored, false);
     }
 
@@ -189,7 +189,7 @@ void tst_qquickanchors::basicAnchorsRTL()
         mirrorAnchors(qobject_cast<QQuickItem*>(child));
 
     foreach (QObject *child, rootItem->children()) {
-        bool mirrored = QQuickItemPrivate::get(qobject_cast<QQuickItem*>(child))->anchors()->property("mirrored").toBool();
+        bool mirrored = QQuickItemPrivate::get(qobject_cast<QQuickItem*>(child))->anchors()->mirrored();
         QCOMPARE(mirrored, true);
     }