Fix QString literals in test_mainwindow.cpp
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
qt-migration-copilot-demo/pipeline/pr-main There was a failure building this commit
Replace u""_s with QStringLiteral() for compiler compatibility Entire-Checkpoint: 7fd5c52cf858
This commit is contained in:
1 file changed
+6
-6
@@ -23,17 +23,17 @@ void TestMainWindowWidget::testMainWindowCreation()
|
||||
void TestMainWindowWidget::testWindowTitle()
|
||||
{
|
||||
MainWindow window;
|
||||
QCOMPARE(window.windowTitle(), u"Qt6 Legacy Migration Benchmark"_s);
|
||||
QCOMPARE(window.windowTitle(), QStringLiteral("Qt6 Legacy Migration Benchmark"));
|
||||
}
|
||||
|
||||
void TestMainWindowWidget::testValidateInputMethod()
|
||||
{
|
||||
MainWindow window;
|
||||
|
||||
QVERIFY(window.validateInput(u"Test123"_s));
|
||||
QVERIFY(window.validateInput(u"abc456"_s));
|
||||
QVERIFY(!window.validateInput(u"123Test"_s));
|
||||
QVERIFY(!window.validateInput(u""_s));
|
||||
QVERIFY(window.validateInput(QStringLiteral("Test123")));
|
||||
QVERIFY(window.validateInput(QStringLiteral("abc456")));
|
||||
QVERIFY(!window.validateInput(QStringLiteral("123Test")));
|
||||
QVERIFY(!window.validateInput(QStringLiteral("")));
|
||||
}
|
||||
|
||||
void TestMainWindowWidget::testGetScreenInfo()
|
||||
@@ -41,7 +41,7 @@ void TestMainWindowWidget::testGetScreenInfo()
|
||||
MainWindow window;
|
||||
QString info = window.getScreenInfo();
|
||||
QVERIFY(!info.isEmpty());
|
||||
QVERIFY(info.contains(u"Screen:"_s));
|
||||
QVERIFY(info.contains(QStringLiteral("Screen:")));
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestMainWindowWidget)
|
||||
|
||||
Reference in new issue
Block a user