diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-08 00:13:30 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-08 00:13:30 (GMT) |
commit | 5917d43049020630cb6e79802547a150670304fd (patch) | |
tree | b65bec031db561fb0fe556a18a22755d19b08f5a /tests | |
parent | 6f3cdff090df6f4cf9044a667c3f331b779a84b5 (diff) | |
parent | 6ecf052a6da0a67a7d499e022757a3cabd83a593 (diff) | |
download | Qt-5917d43049020630cb6e79802547a150670304fd.zip Qt-5917d43049020630cb6e79802547a150670304fd.tar.gz Qt-5917d43049020630cb6e79802547a150670304fd.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qapplication/tst_qapplication.cpp | 30 | ||||
-rw-r--r-- | tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qmenu/tst_qmenu.cpp | 17 |
5 files changed, 29 insertions, 30 deletions
diff --git a/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro b/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro index 462723e..8e58a32 100644 --- a/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro +++ b/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro @@ -1,5 +1,9 @@ load(qttest_p4) contains(QT_CONFIG,declarative): QT += declarative gui +contains(QT_CONFIG,xmlpatterns) { + QT += xmlpatterns + DEFINES += QTEST_XMLPATTERNS +} macx:CONFIG -= app_bundle SOURCES += tst_qmlxmllistmodel.cpp diff --git a/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp b/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp index 8e97b7c..039cbf4 100644 --- a/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp +++ b/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp @@ -39,6 +39,8 @@ ** ****************************************************************************/ #include <qtest.h> + +#ifdef QTEST_XMLPATTERNS #include <QtDeclarative/qmlengine.h> #include <QtDeclarative/qmlcomponent.h> #include <private/qmlxmllistmodel_p.h> @@ -195,3 +197,7 @@ void tst_qmlxmllistmodel::uniqueRoleNames() QTEST_MAIN(tst_qmlxmllistmodel) #include "tst_qmlxmllistmodel.moc" + +#else +QTEST_NOOP_MAIN +#endif diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp index b464867..459ac2b 100644 --- a/tests/auto/qapplication/tst_qapplication.cpp +++ b/tests/auto/qapplication/tst_qapplication.cpp @@ -706,36 +706,6 @@ void tst_QApplication::quitOnLastWindowClosed() QSignalSpy spy(&app, SIGNAL(aboutToQuit())); QSignalSpy spy2(&timer, SIGNAL(timeout())); - QPointer<QMainWindow> mainWindow = new QMainWindow; - QPointer<QWidget> invisibleTopLevelWidget = new QWidget; - invisibleTopLevelWidget->setAttribute(Qt::WA_DontShowOnScreen); - - QVERIFY(app.quitOnLastWindowClosed()); - QVERIFY(mainWindow->testAttribute(Qt::WA_QuitOnClose)); - QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_QuitOnClose)); - QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_DontShowOnScreen)); - - mainWindow->show(); - invisibleTopLevelWidget->show(); - - timer.start(); - QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should quit the application - QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't - - app.exec(); - - QCOMPARE(spy.count(), 1); - QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit - } - { - int argc = 0; - QApplication app(argc, 0, QApplication::GuiServer); - QTimer timer; - timer.setInterval(100); - - QSignalSpy spy(&app, SIGNAL(aboutToQuit())); - QSignalSpy spy2(&timer, SIGNAL(timeout())); - QPointer<CloseEventTestWindow> mainWindow = new CloseEventTestWindow; QVERIFY(app.quitOnLastWindowClosed()); diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp index b92b873..558d4de 100644 --- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp @@ -3357,6 +3357,8 @@ void tst_QDateTimeEdit::keypadAutoAdvance_data() QTest::addColumn<Qt::KeyboardModifiers>("modifiers"); QTest::newRow("None") << (Qt::KeyboardModifiers)Qt::NoModifier; QTest::newRow("Keypad") << (Qt::KeyboardModifiers)Qt::KeypadModifier; + // QTBUG-7842: Using KeyPad with shift (numlock off) + QTest::newRow("Keypad+Shift") << (Qt::KeyboardModifiers)(Qt::KeypadModifier|Qt::ShiftModifier); } diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 9dc18e0..3559b15 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -104,6 +104,7 @@ private slots: void setFixedWidth(); void deleteActionInTriggered(); void pushButtonPopulateOnAboutToShow(); + void QTBUG7907_submenus_autoselect(); protected slots: void onActivated(QAction*); void onHighlighted(QAction*); @@ -930,6 +931,22 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow() QVERIFY(!lastMenu->geometry().intersects(b.geometry())); } +void tst_QMenu::QTBUG7907_submenus_autoselect() +{ + QMenu menu("Test Menu"); + QMenu set1("Setting1"); + QMenu set2("Setting2"); + QMenu subset("Subsetting"); + subset.addAction("Values"); + set1.addMenu(&subset); + menu.addMenu(&set1); + menu.addMenu(&set2); + menu.show(); + QTest::qWaitForWindowShown(&menu); + QTest::mouseClick(&menu, Qt::LeftButton, Qt::NoModifier, QPoint(5,5) ); + QTest::qWait(500); + QVERIFY(!subset.isVisible()); +} QTEST_MAIN(tst_QMenu) |