From 9a204084fd4d68650dad7e0a018429cf0486c3a1 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 24 Jul 2020 14:31:49 +0200 Subject: 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 --- tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/quick/qquicktextinput') 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()); -- cgit v1.2.3