aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/pressandhold/tst_pressandhold.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/pressandhold/tst_pressandhold.cpp b/tests/auto/pressandhold/tst_pressandhold.cpp
index 8c4cf673..f61c9f56 100644
--- a/tests/auto/pressandhold/tst_pressandhold.cpp
+++ b/tests/auto/pressandhold/tst_pressandhold.cpp
@@ -37,13 +37,14 @@
#include <QtTest>
#include <QtQuick>
-// TODO: add QStyleHints::setMousePressAndHoldInterval() to speedup the test
-
class tst_PressAndHold : public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
+ void cleanupTestCase();
+
void pressAndHold_data();
void pressAndHold();
@@ -51,6 +52,16 @@ private slots:
void keepSelection();
};
+void tst_PressAndHold::initTestCase()
+{
+ QGuiApplication::styleHints()->setMousePressAndHoldInterval(100);
+}
+
+void tst_PressAndHold::cleanupTestCase()
+{
+ QGuiApplication::styleHints()->setMousePressAndHoldInterval(-1);
+}
+
void tst_PressAndHold::pressAndHold_data()
{
QTest::addColumn<QByteArray>("data");