aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-07-24 14:31:49 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-07-27 11:34:06 +0200
commit9a204084fd4d68650dad7e0a018429cf0486c3a1 (patch)
tree9b6791dcbd3100525a3f584b17980a86c0bdcfde /tests/auto/quick/qquicktextinput
parent3debb37250b2c57aaaf81940f9dfeb540fd4e380 (diff)
Qt::KeyboardModifiers is not a pointer type
So initializing its members with nullptr Is Just Plain Wrong. This corrects commit 499ec43937e926e4f2fa57a9baa455fcb3862262 Change-Id: I6361f490eb4f5ff0161b399508b86361046bffe9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktextinput')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index d6f2b6ef6a..f95c2547a2 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -3490,8 +3490,8 @@ void tst_qquicktextinput::passwordEchoDelay()
void tst_qquicktextinput::simulateKey(QWindow *view, int key)
{
- QKeyEvent press(QKeyEvent::KeyPress, key, nullptr);
- QKeyEvent release(QKeyEvent::KeyRelease, key, nullptr);
+ QKeyEvent press(QKeyEvent::KeyPress, key, {});
+ QKeyEvent release(QKeyEvent::KeyRelease, key, {});
QGuiApplication::sendEvent(view, &press);
QGuiApplication::sendEvent(view, &release);
@@ -3608,7 +3608,7 @@ void tst_qquicktextinput::focusOnPressOnlyOneItem()
//
// this is a contrived example to be sure, but at the end of this, the
// important thing is that only one thing should have activeFocus.
- Qt::KeyboardModifiers noModifiers = nullptr;
+ Qt::KeyboardModifiers noModifiers = {};
QTest::mousePress(&window, Qt::LeftButton, noModifiers, QPoint(10, 10));
// make sure the press is processed.
@@ -3643,7 +3643,7 @@ void tst_qquicktextinput::openInputPanel()
QCOMPARE(qApp->inputMethod()->isVisible(), false);
// input panel should open on focus
- Qt::KeyboardModifiers noModifiers = nullptr;
+ Qt::KeyboardModifiers noModifiers = {};
QTest::mousePress(&view, Qt::LeftButton, noModifiers);
QGuiApplication::processEvents();
QVERIFY(input->hasActiveFocus());