Replace remaining uses of deprecated _qs with _s
Task-number: QTBUG-101408 Change-Id: I1fda67c07e948af5017f0b99b67f8c20d7052033 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
40ba4b2437
commit
17e06afdc3
@ -283,7 +283,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
|
||||
for (int i = 0; i < lst.size(); ++i) {
|
||||
QStringView language, script, territory;
|
||||
if (qt_splitLocaleName(lst.at(i), &language, &script, &territory)) {
|
||||
QString joined = language.isEmpty() ? u"und"_qs : language.toString();
|
||||
QString joined = language.isEmpty() ? u"und"_s : language.toString();
|
||||
if (!script.isEmpty())
|
||||
joined += u'-' + script;
|
||||
if (!territory.isEmpty())
|
||||
|
@ -172,6 +172,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace QImageReaderWriterHelpers;
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
|
||||
const QByteArray &format,
|
||||
@ -1248,7 +1249,7 @@ bool QImageReader::read(QImage *image)
|
||||
// read the image
|
||||
QString filename = fileName();
|
||||
if (Q_TRACE_ENABLED(QImageReader_read_before_reading)) {
|
||||
Q_TRACE(QImageReader_read_before_reading, this, filename.isEmpty() ? u"unknown"_qs : filename);
|
||||
Q_TRACE(QImageReader_read_before_reading, this, filename.isEmpty() ? u"unknown"_s : filename);
|
||||
}
|
||||
|
||||
const bool result = d->handler->read(image);
|
||||
|
@ -2024,15 +2024,15 @@ void tst_QLocale::toDateTime_data()
|
||||
|
||||
QTest::newRow("short-ss") // QTBUG-102199: trips over an assert in CET
|
||||
<< "C" << QDateTime() // Single-digit seconds does not match ss format.
|
||||
<< u"ddd, d MMM yyyy HH:mm:ss"_qs << u"Sun, 29 Mar 2020 02:26:3"_qs << true;
|
||||
<< u"ddd, d MMM yyyy HH:mm:ss"_s << u"Sun, 29 Mar 2020 02:26:3"_s << true;
|
||||
|
||||
QTest::newRow("short-ss-Z") // Same, but with a valid date-time:
|
||||
<< "C" << QDateTime()
|
||||
<< u"ddd, d MMM yyyy HH:mm:ss t"_qs << u"Sun, 29 Mar 2020 02:26:3 Z"_qs << false;
|
||||
<< u"ddd, d MMM yyyy HH:mm:ss t"_s << u"Sun, 29 Mar 2020 02:26:3 Z"_s << false;
|
||||
|
||||
QTest::newRow("s-Z") // Same, but with a format that accepts the single digit:
|
||||
<< "C" << QDateTime(QDate(2020, 3, 29), QTime(2, 26, 3), Qt::UTC)
|
||||
<< u"ddd, d MMM yyyy HH:mm:s t"_qs << u"Sun, 29 Mar 2020 02:26:3 Z"_qs << false;
|
||||
<< u"ddd, d MMM yyyy HH:mm:s t"_s << u"Sun, 29 Mar 2020 02:26:3 Z"_s << false;
|
||||
|
||||
QTest::newRow("RFC-1123")
|
||||
<< "C" << QDateTime(QDate(2007, 11, 1), QTime(18, 8, 30))
|
||||
|
@ -36,6 +36,8 @@
|
||||
# include <qt_windows.h>
|
||||
#endif
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class tst_QDateTime : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -2943,9 +2945,9 @@ void tst_QDateTime::fromStringStringFormat_data()
|
||||
|
||||
// Two tests derived from malformed ASN.1 strings (QTBUG-84349):
|
||||
QTest::newRow("ASN.1:UTC")
|
||||
<< u"22+221102233Z"_qs << u"yyMMddHHmmsst"_qs << QDateTime();
|
||||
<< u"22+221102233Z"_s << u"yyMMddHHmmsst"_s << QDateTime();
|
||||
QTest::newRow("ASN.1:Generalized")
|
||||
<< u"9922+221102233Z"_qs << u"yyyyMMddHHmmsst"_qs << QDateTime();
|
||||
<< u"9922+221102233Z"_s << u"yyyyMMddHHmmsst"_s << QDateTime();
|
||||
|
||||
// fuzzer test
|
||||
QTest::newRow("integer overflow found by fuzzer")
|
||||
|
@ -43,6 +43,8 @@
|
||||
QT_FORWARD_DECLARE_CLASS(QDomDocument)
|
||||
QT_FORWARD_DECLARE_CLASS(QDomNode)
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
class tst_QDom : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -1445,7 +1447,7 @@ void tst_QDom::roundTripAttributes() const
|
||||
void tst_QDom::roundTripCDATA() const
|
||||
{
|
||||
const QString input = u"<?xml version='1.0' encoding='UTF-8'?>\n"
|
||||
"<content><![CDATA[]]></content>\n"_qs;
|
||||
"<content><![CDATA[]]></content>\n"_s;
|
||||
QString errorMsg;
|
||||
QDomDocument doc;
|
||||
QVERIFY(doc.setContent(input, false, &errorMsg));
|
||||
|
Loading…
Reference in New Issue
Block a user