summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-22 16:13:30 (GMT)
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-12-22 16:16:38 (GMT)
commit8a3c4c8283e4762744a29262ce507713565c1c0c (patch)
tree58dd4f6b14aa353f038032b3c645f4a48704dc33 /tests
parenta5110b5d40b70fb44ed98aa8861b676df1e78385 (diff)
downloadQt-8a3c4c8283e4762744a29262ce507713565c1c0c.zip
Qt-8a3c4c8283e4762744a29262ce507713565c1c0c.tar.gz
Qt-8a3c4c8283e4762744a29262ce507713565c1c0c.tar.bz2
Fix crash in indeterminate progressbars on windows
Note that this is a surgical fix for 4.7 only. In 4.8 we will add these checks at the top of the styling functions or in the widgets instead. Task-number:QTBUG-15227 Reviewed-by:gabi
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qstyle/tst_qstyle.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp
index ba24225..9c754d2 100644
--- a/tests/auto/qstyle/tst_qstyle.cpp
+++ b/tests/auto/qstyle/tst_qstyle.cpp
@@ -413,6 +413,13 @@ void tst_QStyle::testWindowsStyle()
QWindowsStyle wstyle;
testAllFunctions(&wstyle);
lineUpLayoutTest(&wstyle);
+
+ // Tests drawing indeterminate progress with 0 size: QTBUG-15973
+ QStyleOptionProgressBar pb;
+ pb.rect = QRect(0,0,-9,0);
+ QPixmap surface(QSize(200, 200));
+ QPainter painter(&surface);
+ wstyle.drawControl(QStyle::CE_ProgressBar, &pb, &painter, 0);
}
void tst_QStyle::testWindowsXPStyle()