diff options
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 091927abe4..e13dfe836f 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -179,6 +179,8 @@ private slots: void globalStaticObjectDestruction(); // run this last void abortQuitOnShow(); + + void settableStyleHints(); // Needs to run last as it changes style hints. }; class EventSpy : public QObject @@ -1949,7 +1951,7 @@ void tst_QApplication::windowsCommandLine_data() void tst_QApplication::windowsCommandLine() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) QFETCH(QString, args); QFETCH(QString, expected); @@ -2305,6 +2307,22 @@ void tst_QApplication::abortQuitOnShow() QCOMPARE(app.exec(), 1); } +void tst_QApplication::settableStyleHints() +{ + int argc = 0; + QApplication app(argc, 0); + QApplication::setCursorFlashTime(437); + QCOMPARE(QApplication::cursorFlashTime(), 437); + QApplication::setDoubleClickInterval(128); + QCOMPARE(QApplication::doubleClickInterval(), 128); + QApplication::setStartDragDistance(122000); + QCOMPARE(QApplication::startDragDistance(), 122000); + QApplication::setStartDragTime(834); + QCOMPARE(QApplication::startDragTime(), 834); + QApplication::setKeyboardInputInterval(309); + QCOMPARE(QApplication::keyboardInputInterval(), 309); +} + /* This test is meant to ensure that certain objects (public & commonly used) can safely be used in a Q_GLOBAL_STATIC such that their destructors are @@ -2314,7 +2332,9 @@ Q_GLOBAL_STATIC(QLocale, tst_qapp_locale); #ifndef QT_NO_PROCESS Q_GLOBAL_STATIC(QProcess, tst_qapp_process); #endif +#ifndef QT_NO_FILESYSTEMWATCHER Q_GLOBAL_STATIC(QFileSystemWatcher, tst_qapp_fileSystemWatcher); +#endif #ifndef QT_NO_SHAREDMEMORY Q_GLOBAL_STATIC(QSharedMemory, tst_qapp_sharedMemory); #endif @@ -2337,7 +2357,9 @@ void tst_QApplication::globalStaticObjectDestruction() #ifndef QT_NO_PROCESS QVERIFY(tst_qapp_process()); #endif +#ifndef QT_NO_FILESYSTEMWATCHER QVERIFY(tst_qapp_fileSystemWatcher()); +#endif #ifndef QT_NO_SHAREDMEMORY QVERIFY(tst_qapp_sharedMemory()); #endif |