Bring back QDoubleSpinBox test.

Returning text "1.00" instead of "1" sounds right to me.
Checking the test before the widget is shown/validated sounds pointless.

Change-Id: Ifc9e51dc9448a5bb3afbd566fe10524fbabc654f
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
This commit is contained in:
Frederik Gladhorn 2011-10-24 14:14:37 +02:00 committed by Qt by Nokia
parent 692b49abf8
commit 3ff8e94925
2 changed files with 2 additions and 7 deletions

View File

@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qdoublespinbox
QT += widgets testlib
SOURCES += tst_qdoublespinbox.cpp
CONFIG += insignificant_test # QTBUG-21402

View File

@ -854,6 +854,7 @@ void tst_QDoubleSpinBox::removeAll()
void tst_QDoubleSpinBox::task54433()
{
DoubleSpinBox priceSpinBox;
QCOMPARE(priceSpinBox.decimals(), 2);
priceSpinBox.show();
priceSpinBox.setRange(0.0, 999.99);
priceSpinBox.setDecimals(2);
@ -1012,13 +1013,9 @@ void tst_QDoubleSpinBox::task221221()
{
QDoubleSpinBox spin;
QTest::keyClick(&spin, Qt::Key_1);
QCOMPARE(spin.text(), QLatin1String("1"));
spin.show();
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&spin);
#endif
QVERIFY(spin.isVisible());
QCOMPARE(spin.text(), QLatin1String("1"));
QCOMPARE(spin.text(), QLatin1String("1.00"));
}
void tst_QDoubleSpinBox::task255471_decimalsValidation()