summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-12-18 09:07:46 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-12-18 09:07:46 (GMT)
commit0d212670c06ed54ac785e0bb945c792947d388f5 (patch)
treec4f6c6762ad42df463f30e05e090fa2cfa9de77a /tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
parent371420d5f31a04b91c01807139d49e97db040bee (diff)
parent7c1283fca1ef2e742b5794600e00edf0c3e3020f (diff)
downloadQt-0d212670c06ed54ac785e0bb945c792947d388f5.zip
Qt-0d212670c06ed54ac785e0bb945c792947d388f5.tar.gz
Qt-0d212670c06ed54ac785e0bb945c792947d388f5.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp')
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
index 7f03153..a3f0915 100644
--- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -148,6 +148,7 @@ private slots:
void task255471_decimalsValidation();
void taskQTBUG_5008_textFromValueAndValidate();
+ void taskQTBUG_6670_selectAllWithPrefix();
public slots:
void valueChangedHelper(const QString &);
@@ -1084,5 +1085,16 @@ void tst_QDoubleSpinBox::taskQTBUG_5008_textFromValueAndValidate()
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
}
+void tst_QDoubleSpinBox::taskQTBUG_6670_selectAllWithPrefix()
+{
+ DoubleSpinBox spin;
+ spin.setPrefix("$ ");
+ spin.lineEdit()->selectAll();
+ QTest::keyClick(spin.lineEdit(), Qt::Key_1);
+ QCOMPARE(spin.value(), 1.);
+ QTest::keyClick(spin.lineEdit(), Qt::Key_2);
+ QCOMPARE(spin.value(), 12.);
+}
+
QTEST_MAIN(tst_QDoubleSpinBox)
#include "tst_qdoublespinbox.moc"