Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 12.0.1
-
None
-
1bd3c7d9e (13.0)
Description
When building a new Qt Quick project with latest (as of today) dev:
/home/mitch/dev/temp/quick/main.cpp: In function ‘int main(int, char**)’: /home/mitch/dev/temp/quick/main.cpp:9:20: warning: ‘QString QtLiterals::operator""_qs(const char16_t*, size_t)’ is deprecated: Use _s from Qt::StringLiterals namespace instead. [-Wdeprecated-declarations] 9 | const QUrl url(u"qrc:/quick/Main.qml"_qs); | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/mitch/dev/qt-dev-debug/qtbase/include/QtCore/qstring.h:1, from /home/mitch/dev/qt-dev/qtbase/src/corelib/kernel/qcoreapplication.h:8, from /home/mitch/dev/qt-dev-debug/qtbase/include/QtCore/qcoreapplication.h:1, from /home/mitch/dev/qt-dev/qtbase/src/gui/kernel/qguiapplication.h:8, from /home/mitch/dev/qt-dev-debug/qtbase/include/QtGui/qguiapplication.h:1, from /home/mitch/dev/qt-dev-debug/qtbase/include/QtGui/QGuiApplication:1, from /home/mitch/dev/temp/quick/main.cpp:1: /home/mitch/dev/qt-dev/qtbase/src/corelib/text/qstring.h:1589:16: note: declared here 1589 | inline QString operator""_qs(const char16_t *str, size_t size) noexcept | ^~~~~~~~
There are a few other instances too:
mitch@mitch-kubuntu:~/dev/qt-creator$ git grep _qs -- share/qtcreator/templates/wizards share/qtcreator/templates/wizards/projects/qtquick2-extension/example/example.cpp: const QUrl url(u"qrc:/ExampleProjectApp/example/example.qml"_qs); share/qtcreator/templates/wizards/projects/qtquickapplication/main.cpp: const QUrl url(u"qrc:/%{JS: value('ProjectName')}/Main.qml"_qs); share/qtcreator/templates/wizards/projects/qtquickapplication_compat/main.cpp: const QUrl url(u"qrc:/%{JS: value('ProjectName')}/main.qml"_qs);