summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-03-05 12:31:03 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-05 14:09:24 +0100
commitd94165ab326f24a725720a705405067975b82af8 (patch)
treed5b69d74d2caff8f1d5d331bc2eb5e636f8b7796 /tests/auto/widgets/styles
parentc01ef19e772c3c5dddccf8ea03e7db4e8d71784c (diff)
Fix tst_QStyleSheetStyle::qproperty to not implicitly rely on QHash ordering.
Changing qHash() for string data affected the order of properties to be set, causing 'checkable' to be set after 'checked'. As 'checkable' state affects 'checked' as well (setting it to false), this means that the test was unreliable, a bug, which was exposed by the qHash change. Change-Id: I03a8dd7d07609683d99f0b2a40012a147d409c6e Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 1201b0f1da..8f187190aa 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -555,11 +555,11 @@ void tst_QStyleSheetStyle::layoutSpacing()
void tst_QStyleSheetStyle::qproperty()
{
QPushButton pb;
- pb.setStyleSheet("QPushButton { qproperty-text: hello; qproperty-checkable: true; qproperty-checked: 1}");
+ pb.setStyleSheet("QPushButton { qproperty-text: hello; qproperty-checkable: 1; qproperty-checked: false}");
pb.ensurePolished();
QCOMPARE(pb.text(), QString("hello"));
QCOMPARE(pb.isCheckable(), true);
- QCOMPARE(pb.isChecked(), true);
+ QCOMPARE(pb.isChecked(), false);
}
namespace ns {