diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-21 17:21:05 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-23 13:23:27 +0200 |
commit | 925b0e6f1b118f823d57ec8cb0edfa654d1e50ea (patch) | |
tree | 162587aecf730060e567ada2c863baf6ce1d1b97 /src/qmltest | |
parent | 45af5ef2f63704adc515e29260ad8c6aaf51f08e (diff) |
Use qWarning() in preference to QTest::qWarn()
QtTest's custome message handler routes it to the same place and
QTest::qWarn() is on its way to deprecation.
Change-Id: Ic27c9beda5976a1f6d07029bdca74c7e0c4454a0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/qmltest')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index a0ceb7706f..77b826834d 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -225,9 +225,10 @@ namespace QtQuickTest QSpontaneKeyEvent::setSpontaneous(&me); if (!qApp->notify(window, &me)) { static const char *mouseActionNames[] = - { "MousePress", "MouseRelease", "MouseClick", "MouseDoubleClick", "MouseMove", "MouseDoubleClickSequence" }; - QString warning = QString::fromLatin1("Mouse event \"%1\" not accepted by receiving window"); - QTest::qWarn(warning.arg(QString::fromLatin1(mouseActionNames[static_cast<int>(action)])).toLatin1().data()); + { "MousePress", "MouseRelease", "MouseClick", "MouseDoubleClick", "MouseMove", + "MouseDoubleClickSequence" }; + qWarning("Mouse event \"%s\" not accepted by receiving window", + mouseActionNames[static_cast<int>(action)]); } } @@ -260,7 +261,7 @@ namespace QtQuickTest QSpontaneKeyEvent::setSpontaneous(&we); // hmmmm if (!qApp->notify(window, &we)) - QTest::qWarn("Wheel event not accepted by receiving window"); + qWarning("Wheel event not accepted by receiving window"); } #endif }; |