@@ -2338,9 +2338,9 @@ void tst_QWebEngineView::imeJSInputEvents()
2338
2338
2339
2339
// Simply committing text should not trigger any JS composition event.
2340
2340
QTRY_COMPARE (logLines ().count (), 3 );
2341
- QCOMPARE (logLines ()[0 ], " [object InputEvent] beforeinput commit" );
2342
- QCOMPARE (logLines ()[1 ], " [object TextEvent] textInput commit" );
2343
- QCOMPARE (logLines ()[2 ], " [object InputEvent] input commit" );
2341
+ QCOMPARE (logLines ()[0 ], QStringLiteral ( " [object InputEvent] beforeinput commit" ) );
2342
+ QCOMPARE (logLines ()[1 ], QStringLiteral ( " [object TextEvent] textInput commit" ) );
2343
+ QCOMPARE (logLines ()[2 ], QStringLiteral ( " [object InputEvent] input commit" ) );
2344
2344
2345
2345
evaluateJavaScriptSync (view.page (), " clear()" );
2346
2346
QTRY_VERIFY (evaluateJavaScriptSync (view.page (), " log.textContent + input.textContent" ).toString ().isEmpty ());
@@ -2354,10 +2354,10 @@ void tst_QWebEngineView::imeJSInputEvents()
2354
2354
}
2355
2355
2356
2356
QTRY_COMPARE (logLines ().count (), 4 );
2357
- QCOMPARE (logLines ()[0 ], " [object CompositionEvent] compositionstart " );
2358
- QCOMPARE (logLines ()[1 ], " [object InputEvent] beforeinput preedit" );
2359
- QCOMPARE (logLines ()[2 ], " [object CompositionEvent] compositionupdate preedit" );
2360
- QCOMPARE (logLines ()[3 ], " [object InputEvent] input preedit" );
2357
+ QCOMPARE (logLines ()[0 ], QStringLiteral ( " [object CompositionEvent] compositionstart " ) );
2358
+ QCOMPARE (logLines ()[1 ], QStringLiteral ( " [object InputEvent] beforeinput preedit" ) );
2359
+ QCOMPARE (logLines ()[2 ], QStringLiteral ( " [object CompositionEvent] compositionupdate preedit" ) );
2360
+ QCOMPARE (logLines ()[3 ], QStringLiteral ( " [object InputEvent] input preedit" ) );
2361
2361
2362
2362
{
2363
2363
QList<QInputMethodEvent::Attribute> attributes;
@@ -2368,11 +2368,11 @@ void tst_QWebEngineView::imeJSInputEvents()
2368
2368
}
2369
2369
2370
2370
QTRY_COMPARE (logLines ().count (), 9 );
2371
- QCOMPARE (logLines ()[4 ], " [object InputEvent] beforeinput commit" );
2372
- QCOMPARE (logLines ()[5 ], " [object CompositionEvent] compositionupdate commit" );
2373
- QCOMPARE (logLines ()[6 ], " [object TextEvent] textInput commit" );
2374
- QCOMPARE (logLines ()[7 ], " [object InputEvent] input commit" );
2375
- QCOMPARE (logLines ()[8 ], " [object CompositionEvent] compositionend commit" );
2371
+ QCOMPARE (logLines ()[4 ], QStringLiteral ( " [object InputEvent] beforeinput commit" ) );
2372
+ QCOMPARE (logLines ()[5 ], QStringLiteral ( " [object CompositionEvent] compositionupdate commit" ) );
2373
+ QCOMPARE (logLines ()[6 ], QStringLiteral ( " [object TextEvent] textInput commit" ) );
2374
+ QCOMPARE (logLines ()[7 ], QStringLiteral ( " [object InputEvent] input commit" ) );
2375
+ QCOMPARE (logLines ()[8 ], QStringLiteral ( " [object CompositionEvent] compositionend commit" ) );
2376
2376
2377
2377
evaluateJavaScriptSync (view.page (), " clear()" );
2378
2378
QTRY_VERIFY (evaluateJavaScriptSync (view.page (), " log.textContent + input.textContent" ).toString ().isEmpty ());
@@ -2386,10 +2386,10 @@ void tst_QWebEngineView::imeJSInputEvents()
2386
2386
}
2387
2387
2388
2388
QTRY_COMPARE (logLines ().count (), 4 );
2389
- QCOMPARE (logLines ()[0 ], " [object CompositionEvent] compositionstart " );
2390
- QCOMPARE (logLines ()[1 ], " [object InputEvent] beforeinput preedit" );
2391
- QCOMPARE (logLines ()[2 ], " [object CompositionEvent] compositionupdate preedit" );
2392
- QCOMPARE (logLines ()[3 ], " [object InputEvent] input preedit" );
2389
+ QCOMPARE (logLines ()[0 ], QStringLiteral ( " [object CompositionEvent] compositionstart " ) );
2390
+ QCOMPARE (logLines ()[1 ], QStringLiteral ( " [object InputEvent] beforeinput preedit" ) );
2391
+ QCOMPARE (logLines ()[2 ], QStringLiteral ( " [object CompositionEvent] compositionupdate preedit" ) );
2392
+ QCOMPARE (logLines ()[3 ], QStringLiteral ( " [object InputEvent] input preedit" ) );
2393
2393
2394
2394
{
2395
2395
QList<QInputMethodEvent::Attribute> attributes;
@@ -2399,11 +2399,11 @@ void tst_QWebEngineView::imeJSInputEvents()
2399
2399
}
2400
2400
2401
2401
QTRY_COMPARE (logLines ().count (), 9 );
2402
- QCOMPARE (logLines ()[4 ], " [object InputEvent] beforeinput " );
2403
- QCOMPARE (logLines ()[5 ], " [object CompositionEvent] compositionupdate " );
2404
- QCOMPARE (logLines ()[6 ], " [object TextEvent] textInput " );
2405
- QCOMPARE (logLines ()[7 ], " [object InputEvent] input null" );
2406
- QCOMPARE (logLines ()[8 ], " [object CompositionEvent] compositionend " );
2402
+ QCOMPARE (logLines ()[4 ], QStringLiteral ( " [object InputEvent] beforeinput " ) );
2403
+ QCOMPARE (logLines ()[5 ], QStringLiteral ( " [object CompositionEvent] compositionupdate " ) );
2404
+ QCOMPARE (logLines ()[6 ], QStringLiteral ( " [object TextEvent] textInput " ) );
2405
+ QCOMPARE (logLines ()[7 ], QStringLiteral ( " [object InputEvent] input null" ) );
2406
+ QCOMPARE (logLines ()[8 ], QStringLiteral ( " [object CompositionEvent] compositionend " ) );
2407
2407
2408
2408
evaluateJavaScriptSync (view.page (), " clear()" );
2409
2409
QTRY_VERIFY (evaluateJavaScriptSync (view.page (), " log.textContent + input.textContent" ).toString ().isEmpty ());
0 commit comments