summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstylesheetstyle
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-02-17 11:32:57 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2011-02-17 11:32:57 +0100
commit57f2c8b9bd3a7cfd0e1f9636880cb9a6130da885 (patch)
tree982e37fb314d9c8e5d4cd0a240499edb56710808 /tests/auto/qstylesheetstyle
parentdee5662e0218e754d425c8960edb1e8ffd27fde6 (diff)
parent6e323d672ce679b253eb1d49bac1669349067a7b (diff)
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: mkspecs/features/symbian/symbian_building.prf mkspecs/symbian-gcce/qmake.conf src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/plugins/plugins.pro tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
Diffstat (limited to 'tests/auto/qstylesheetstyle')
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 50002a6169..83adf49fa4 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -100,6 +100,7 @@ private slots:
void task188195_baseBackground();
void task232085_spinBoxLineEditBg();
void changeStyleInChangeEvent();
+ void QTBUG15910_crashNullWidget();
//at the end because it mess with the style.
void widgetStyle();
@@ -1657,6 +1658,23 @@ void tst_QStyleSheetStyle::QTBUG11658_cachecrash()
qApp->setStyleSheet(QString());
}
+void tst_QStyleSheetStyle::QTBUG15910_crashNullWidget()
+{
+ struct : QWidget {
+ virtual void paintEvent(QPaintEvent* ) {
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, 0);
+ style()->drawPrimitive(QStyle::PE_Frame, &opt, &p, 0);
+ style()->drawControl(QStyle::CE_PushButton, &opt, &p, 0);
+ }
+ } w;
+ w.setStyleSheet("* { background-color: white; color:black; border 3px solid yellow }");
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+}
+
QTEST_MAIN(tst_QStyleSheetStyle)
#include "tst_qstylesheetstyle.moc"