summaryrefslogtreecommitdiffstats
path: root/tests/auto/qprogressbar/tst_qprogressbar.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-06-08 07:01:15 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-06-08 07:01:15 (GMT)
commit23ae8b6badfd688f962590268a6147771d27266c (patch)
treefc27f20c32e6dccbe39267214e65528b238ced70 /tests/auto/qprogressbar/tst_qprogressbar.cpp
parent768cab51239a45f00d5ee3857efecd3d2cdcb99b (diff)
parentd4257360234a967bfbacde92ec2bb1ac8979b793 (diff)
downloadQt-23ae8b6badfd688f962590268a6147771d27266c.zip
Qt-23ae8b6badfd688f962590268a6147771d27266c.tar.gz
Qt-23ae8b6badfd688f962590268a6147771d27266c.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'tests/auto/qprogressbar/tst_qprogressbar.cpp')
-rw-r--r--tests/auto/qprogressbar/tst_qprogressbar.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/auto/qprogressbar/tst_qprogressbar.cpp b/tests/auto/qprogressbar/tst_qprogressbar.cpp
index d6379d3..cb037e0 100644
--- a/tests/auto/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/qprogressbar/tst_qprogressbar.cpp
@@ -63,6 +63,7 @@ private slots:
void setValueRepaint();
void sizeHint();
+ void task245201_testChangeStyleAndDelete_data();
void task245201_testChangeStyleAndDelete();
};
@@ -224,15 +225,30 @@ void tst_QProgressBar::sizeHint()
QCOMPARE(barSize.height(), size.height());
}
+void tst_QProgressBar::task245201_testChangeStyleAndDelete_data()
+{
+ QTest::addColumn<QString>("style1_str");
+ QTest::addColumn<QString>("style2_str");
+
+ QTest::newRow("plastique-windows") << QString::fromLatin1("plastique") << QString::fromLatin1("windows");
+ QTest::newRow("mlotif-windows") << QString::fromLatin1("motif") << QString::fromLatin1("windows");
+ QTest::newRow("cleanlooks-cde") << QString::fromLatin1("cleanlooks") << QString::fromLatin1("cde");
+ QTest::newRow("gtk-plastique") << QString::fromLatin1("gtk") << QString::fromLatin1("plastique");
+}
+
void tst_QProgressBar::task245201_testChangeStyleAndDelete()
{
+ QFETCH(QString, style1_str);
+ QFETCH(QString, style2_str);
+
QProgressBar *bar = new QProgressBar;
- QStyle *style = QStyleFactory::create("plastique");
+ QStyle *style = QStyleFactory::create(style1_str);
bar->setStyle(style);
bar->show();
- QStyle *style2 = QStyleFactory::create("windows");
+ QStyle *style2 = QStyleFactory::create(style2_str);
bar->setStyle(style2);
+ QTest::qWait(10);
delete bar;
QTest::qWait(100); //should not crash