summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-04-14 07:36:38 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2011-05-27 07:16:35 (GMT)
commitfbe0d24bdd429248dbf9e9be592f15fd7b1648bc (patch)
tree2f47219f2c1122c7c0b18f1be337be21ab752610 /tests
parent67ed18497705fa938728c505d165173dc5d3de68 (diff)
downloadQt-fbe0d24bdd429248dbf9e9be592f15fd7b1648bc.zip
Qt-fbe0d24bdd429248dbf9e9be592f15fd7b1648bc.tar.gz
Qt-fbe0d24bdd429248dbf9e9be592f15fd7b1648bc.tar.bz2
Remove unnecessary QtQuick 1.1 effectiveLayoutDirection, effectiveHorizontalAlignment and anchors.mirror properties
* these properties are seldomly used * they confuse developers that do not care about right-to-left user interfaces * LayoutMirroring.enabled property can be used instead to determine if mirroring is enabled * if needed, you can easily determine the effective layout directions and alignments with a little bit of JavaScript: function effectiveLayoutDirection() { if (LayoutMirroring.enabled) return (listView.layoutDirection == Qt.LeftToRight) ? Qt.RightToLeft : Qt.LeftToRight; else return listView.layoutDirection; } Task-number: QTBUG-11042 Reviewed-by: Martin Jones
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 0442350..3d8d2d9 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -58,7 +58,6 @@
Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
-
class tst_qdeclarativeanchors : public QObject
{
Q_OBJECT
@@ -291,7 +290,7 @@ void tst_qdeclarativeanchors::basicAnchorsRTL()
QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(view->rootObject());
foreach(QObject *child, rootItem->children()) {
- bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->property("mirrored").toBool();
+ bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->mirrored();
QCOMPARE(mirrored, false);
}
@@ -299,7 +298,7 @@ void tst_qdeclarativeanchors::basicAnchorsRTL()
mirrorAnchors(qobject_cast<QDeclarativeItem*>(child));
foreach(QObject *child, rootItem->children()) {
- bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->property("mirrored").toBool();
+ bool mirrored = QDeclarativeItemPrivate::get(qobject_cast<QDeclarativeItem*>(child))->anchors()->mirrored();
QCOMPARE(mirrored, true);
}