diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 19:16:28 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 19:16:28 (GMT) |
commit | a9ebf946966f4d0a82c040e4b7fb67d973d506e9 (patch) | |
tree | 9798e7e3984153f8b8f6192a37d59c3f7881216f /tests/auto | |
parent | fe949effc79830f7e40ddd238114dc8e0553291c (diff) | |
parent | 7219ed4ba65b69f4c8829da176cb19684d012d90 (diff) | |
download | Qt-a9ebf946966f4d0a82c040e4b7fb67d973d506e9.zip Qt-a9ebf946966f4d0a82c040e4b7fb67d973d506e9.tar.gz Qt-a9ebf946966f4d0a82c040e4b7fb67d973d506e9.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')
-rw-r--r-- | tests/auto/lancelot/lancelot.pro | 1 | ||||
-rw-r--r-- | tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/lancelot/lancelot.pro b/tests/auto/lancelot/lancelot.pro index 3859a55..6498f6c 100644 --- a/tests/auto/lancelot/lancelot.pro +++ b/tests/auto/lancelot/lancelot.pro @@ -8,5 +8,6 @@ HEADERS += $$QT_SOURCE_TREE/tests/arthur/common/paintcommands.h RESOURCES += $$QT_SOURCE_TREE/tests/arthur/common/images.qrc include($$QT_SOURCE_TREE/tests/arthur/common/baselineprotocol.pri) +DEFINES += QMAKESPEC=\\\"$$QMAKESPEC\\\" !symbian:!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\" 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" |