Port away from deprecated _qs UDL
Use Qt::StringLiterals::_s instead. Also reflow lines because stricter /Zc options coming in from a qtbase update make MSVS barf on line-broken u"" ""_s expressions. Change-Id: I95a2a3d878d2ac506d9c54bbdeb734cf5d94bb8b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
6f64675384
commit
b30a49f2c6
|
@ -6,6 +6,8 @@
|
|||
#include <QtQml/qqmlextensionplugin.h>
|
||||
#include <QtQuickControls2/qquickstyle.h>
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication app(argc, argv);
|
||||
|
@ -13,7 +15,7 @@ int main(int argc, char *argv[])
|
|||
QQuickStyle::setStyle("iOS");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
const QUrl url(u"qrc:/main.qml"_qs);
|
||||
const QUrl url(u"qrc:/main.qml"_s);
|
||||
QObject::connect(
|
||||
&engine, &QQmlApplicationEngine::objectCreated, &app,
|
||||
[url](QObject *obj, const QUrl &objUrl) {
|
||||
|
|
|
@ -11,6 +11,8 @@ Q_IMPORT_QML_PLUGIN(duck_tickPlugin)
|
|||
Q_IMPORT_QML_PLUGIN(duck_trickPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(duck_trackPlugin)
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class test : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -22,7 +24,7 @@ void test::test_loadable()
|
|||
{
|
||||
QQmlEngine engine;
|
||||
engine.addImportPath(QStringLiteral(":/"));
|
||||
QQmlComponent c(&engine, QUrl(u"qrc:/duck/main.qml"_qs));
|
||||
QQmlComponent c(&engine, QUrl(u"qrc:/duck/main.qml"_s));
|
||||
QVERIFY2(c.isReady(), qPrintable(c.errorString()));
|
||||
QScopedPointer<QObject> o(c.create());
|
||||
QVERIFY(!o.isNull());
|
||||
|
|
|
@ -424,13 +424,11 @@ void tst_QmllsCompletions::function_documentations()
|
|||
continue;
|
||||
|
||||
QVERIFY2(c.detail == details,
|
||||
qPrintable(u"Completion item '%1' has wrong "
|
||||
"details '%2'"_qs.arg(label)
|
||||
.arg(*c.detail)));
|
||||
qPrintable(u"Completion item '%1' has wrong details '%2'"_s
|
||||
.arg(label).arg(*c.detail)));
|
||||
QVERIFY2(cDoc == docs,
|
||||
qPrintable(u"Completion item '%1' has wrong "
|
||||
"documentation '%2'"_qs.arg(label)
|
||||
.arg(cDoc)));
|
||||
qPrintable(u"Completion item '%1' has wrong documentation '%2'"_s
|
||||
.arg(label).arg(cDoc)));
|
||||
}
|
||||
}
|
||||
clean();
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
using namespace QLspSpecification;
|
||||
|
||||
class DiagnosticsHandler
|
||||
|
@ -127,8 +128,8 @@ void tst_Qmlls::initTestCase()
|
|||
tDoc.publishDiagnostics = pDiag;
|
||||
pDiag.versionSupport = true;
|
||||
clientInfo.capabilities.textDocument = tDoc;
|
||||
QJsonObject workspace({ { u"didChangeWatchedFiles"_qs,
|
||||
QJsonObject({ { u"dynamicRegistration"_qs, true } }) } });
|
||||
QJsonObject workspace({ { u"didChangeWatchedFiles"_s,
|
||||
QJsonObject({ { u"dynamicRegistration"_s, true } }) } });
|
||||
clientInfo.capabilities.workspace = workspace;
|
||||
bool didInit = false;
|
||||
m_protocol.registerRegistrationRequestHandler([this](const QByteArray &,
|
||||
|
|
Loading…
Reference in New Issue