diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-17 10:32:57 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-17 10:32:57 (GMT) |
commit | 57f2c8b9bd3a7cfd0e1f9636880cb9a6130da885 (patch) | |
tree | 982e37fb314d9c8e5d4cd0a240499edb56710808 /tests/auto/qstylesheetstyle | |
parent | dee5662e0218e754d425c8960edb1e8ffd27fde6 (diff) | |
parent | 6e323d672ce679b253eb1d49bac1669349067a7b (diff) | |
download | Qt-57f2c8b9bd3a7cfd0e1f9636880cb9a6130da885.zip Qt-57f2c8b9bd3a7cfd0e1f9636880cb9a6130da885.tar.gz Qt-57f2c8b9bd3a7cfd0e1f9636880cb9a6130da885.tar.bz2 |
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.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp index 50002a6..83adf49 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" |