diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-10-15 14:12:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-22 10:04:48 +0200 |
commit | 2d107c20b9670976e0d4a22edc6c3b235e225fa4 (patch) | |
tree | d14f94bd6fde77eab35ae6170d0b0d0202bdfa15 /tests | |
parent | 93cd08bfcc3b5b83196b6dabf859d5301cc90c98 (diff) |
Fix settable style hints.
Introduce QStyleHintsPrivate and introduce internal
setters called by QApplication.
Task-number: QTBUG-33991
Change-Id: Id61f8b1e2b5c9cfd7b4713aaded66e93e6f63719
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index fee8b6aee5..f2fa1f87fa 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -178,6 +178,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 @@ -2247,6 +2249,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 |