summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-11-12 18:03:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-11-12 18:03:55 (GMT)
commitbc992fd8381697f57c6abb13b5fa17167d98867a (patch)
tree3097634913b46ae0cdd2603e8650d95d489bfea4 /tests
parentfbdde19e169975693bd179f3e493f0b588ed39f4 (diff)
parentdf819cfe17f6dfd089096063524932fc4975804f (diff)
downloadQt-bc992fd8381697f57c6abb13b5fa17167d98867a.zip
Qt-bc992fd8381697f57c6abb13b5fa17167d98867a.tar.gz
Qt-bc992fd8381697f57c6abb13b5fa17167d98867a.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fixed wrong QGroupBox check state Added base 10 to be used with QIntValidator. Mac: Fix the color of check marks in menus with stylesheet Russian translation update Don't directly access QList contents Fix QPlainTextEdit when using Qt::TextSelectableByKeyboard flag
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgroupbox/tst_qgroupbox.cpp23
-rw-r--r--tests/auto/qintvalidator/tst_qintvalidator.cpp9
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/qgroupbox/tst_qgroupbox.cpp b/tests/auto/qgroupbox/tst_qgroupbox.cpp
index f1388bc..f3d26ef 100644
--- a/tests/auto/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/qgroupbox/tst_qgroupbox.cpp
@@ -83,6 +83,7 @@ private slots:
void toggledVsClicked();
void childrenAreDisabled();
void propagateFocus();
+ void task_QTBUG_19170_ignoreMouseReleseEvent();
private:
bool checked;
@@ -473,5 +474,27 @@ void tst_QGroupBox::propagateFocus()
QTRY_COMPARE(qApp->focusWidget(), static_cast<QWidget*>(&lineEdit));
}
+void tst_QGroupBox::task_QTBUG_19170_ignoreMouseReleseEvent()
+{
+ QGroupBox box;
+ box.setCheckable(true);
+ box.setChecked(false);
+ box.setTitle("This is a test for QTBUG-19170");
+ box.show();
+
+ QStyleOptionGroupBox option;
+ option.initFrom(&box);
+ option.subControls = QStyle::SubControls(QStyle::SC_All);
+ QRect rect = box.style()->subControlRect(QStyle::CC_GroupBox, &option,
+ QStyle::SC_GroupBoxCheckBox, &box);
+
+ QTest::mouseClick(&box, Qt::LeftButton, 0, rect.center());
+ QCOMPARE(box.isChecked(), true);
+
+ box.setChecked(false);
+ QTest::mouseRelease(&box, Qt::LeftButton, 0, rect.center());
+ QCOMPARE(box.isChecked(), false);
+}
+
QTEST_MAIN(tst_QGroupBox)
#include "tst_qgroupbox.moc"
diff --git a/tests/auto/qintvalidator/tst_qintvalidator.cpp b/tests/auto/qintvalidator/tst_qintvalidator.cpp
index d537635..7e36093 100644
--- a/tests/auto/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/qintvalidator/tst_qintvalidator.cpp
@@ -168,6 +168,15 @@ void tst_QIntValidator::validate_data()
QTest::newRow("8.9") << -1 << 100 << QString("5") << ACC;
QTest::newRow("8.10") << -1 << 100 << QString("+") << INT;
QTest::newRow("8.11") << -1 << 100 << QString("+50") << ACC;
+
+ QTest::newRow("9.0") << -10 << 10 << QString("000") << ACC;
+ QTest::newRow("9.1") << -10 << 10 << QString("008") << ACC;
+ QTest::newRow("9.2") << -10 << 10 << QString("-008") << ACC;
+ QTest::newRow("9.3") << -10 << 10 << QString("00010") << ACC;
+ QTest::newRow("9.4") << -10 << 10 << QString("-00010") << ACC;
+ QTest::newRow("9.5") << -10 << 10 << QString("00020") << INV;
+ QTest::newRow("9.6") << -10 << 10 << QString("-00020") << INV;
+
}
void tst_QIntValidator::validateArabic()