summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-08-07 11:06:35 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-08-16 10:17:04 +0000
commit37bb907a921edab7e2ac675f82d93cc08e96fc01 (patch)
tree34ecbad26b65053469d11a12362e75fd1e3e9639 /tests/auto/widgets
parent32f1bf0cac28806ae79a7467ed9dd5f16f6debde (diff)
Add debugging output to help diagnose cause of tst_qspinbox failure
I've tried to reproduce the failures in the CI a couple of times now, but it keeps passing. Let's leave some debug output in the test so that if/when it does fail, we might know a bit more about why it does so. Task-number: QTBUG-69492 Change-Id: I5b39ac692e9026ce4b25cd13d342b11e061b777b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Nathan Collins <nathan.collins@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 5a51bab51f..37bb28dec9 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -1775,6 +1775,10 @@ void tst_QSpinBox::stepModifierPressAndHold()
spin.setStyle(stepModifierStyle.data());
QSignalSpy spy(&spin, QOverload<int>::of(&SpinBox::valueChanged));
+ // TODO: remove debug output when QTBUG-69492 is fixed
+ connect(&spin, QOverload<int>::of(&SpinBox::valueChanged), [=]() {
+ qDebug() << QTime::currentTime() << "valueChanged emitted";
+ });
spin.show();
QVERIFY(QTest::qWaitForWindowActive(&spin));
@@ -1785,6 +1789,9 @@ void tst_QSpinBox::stepModifierPressAndHold()
const QRect buttonRect = spin.style()->subControlRect(
QStyle::CC_SpinBox, &spinBoxStyleOption, subControl, &spin);
+ // TODO: remove debug output when QTBUG-69492 is fixed
+ qDebug() << "QGuiApplication::focusWindow():" << QGuiApplication::focusWindow();
+ qDebug() << "QGuiApplication::topLevelWindows():" << QGuiApplication::topLevelWindows();
QTest::mousePress(&spin, Qt::LeftButton, modifiers, buttonRect.center());
QTRY_VERIFY2(spy.length() >= 3, qPrintable(QString::fromLatin1(
"Expected valueChanged() to be emitted 3 or more times, but it was only emitted %1 times").arg(spy.length())));