diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 04:55:01 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 04:55:01 (GMT) |
commit | 7219ed4ba65b69f4c8829da176cb19684d012d90 (patch) | |
tree | bc7c764142fa4312a258f1c91a3659686d5abbc1 /tests/auto/qstylesheetstyle | |
parent | 8b01937c36632fca8774e90d22ce2aaeb2df883d (diff) | |
parent | 46910068c310460ee18b579a161618ea6a89f50e (diff) | |
download | Qt-7219ed4ba65b69f4c8829da176cb19684d012d90.zip Qt-7219ed4ba65b69f4c8829da176cb19684d012d90.tar.gz Qt-7219ed4ba65b69f4c8829da176cb19684d012d90.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Silence warning in qvector with MSVC
QStyleSheetStyle: Fix crash that occurs with several instance of QStyleSheetStyle
QStyleSheetStyle: add a way to style the up arrow
QPointer: assert when using QPointer on destroyed QObject
Add missing Q_ENUMS to QAbstractSocket
Fix QMenu rendering in the unified toolbar
Add even more platform info, and make it expandable.
Hide nonfunctional links, and improve html
Diffstat (limited to 'tests/auto/qstylesheetstyle')
-rw-r--r-- | tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp index 0396408..efcbc53 100644 --- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -104,6 +104,7 @@ private slots: //at the end because it mess with the style. void widgetStyle(); void appStyle(); + void QTBUG11658_cachecrash(); private: QColor COLOR(const QWidget& w) { w.ensurePolished(); @@ -1626,6 +1627,37 @@ void tst_QStyleSheetStyle::changeStyleInChangeEvent() wid.ensurePolished(); } +void tst_QStyleSheetStyle::QTBUG11658_cachecrash() +{ + //should not crash + class Widget : public QWidget + { + public: + Widget(QWidget *parent = 0) + : QWidget(parent) + { + QVBoxLayout* pLayout = new QVBoxLayout(this); + QCheckBox* pCheckBox = new QCheckBox(this); + pLayout->addWidget(pCheckBox); + setLayout(pLayout); + + QString szStyleSheet = QLatin1String("* { color: red; }"); + qApp->setStyleSheet(szStyleSheet); + qApp->setStyle(QStyleFactory::create(QLatin1String("Windows"))); + } + }; + + Widget *w = new Widget(); + delete w; + w = new Widget(); + w->show(); + + QTest::qWaitForWindowShown(w); + delete w; + qApp->setStyleSheet(QString()); +} + + QTEST_MAIN(tst_QStyleSheetStyle) #include "tst_qstylesheetstyle.moc" |