diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-09 16:34:49 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-25 19:16:29 +0100 |
commit | 753a08ae0e1204b148cf3935f87349eefe75d338 (patch) | |
tree | 193ff5b6a131bba519336c31727d708ddab43032 /src/corelib/io/qiodevice.cpp | |
parent | 1fefff6d1f99dbcf1a453424753ad5562fb675ef (diff) |
QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicable
As a drive-by, did also minor refactorings/improvements.
Task-number: QTBUG-98434
Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 978c6f2486..fdeed890f4 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + #ifdef QIODEVICE_DEBUG void debugBinaryString(const QByteArray &input) { @@ -2246,23 +2248,23 @@ QDebug operator<<(QDebug debug, QIODevice::OpenMode modes) debug << "OpenMode("; QStringList modeList; if (modes == QIODevice::NotOpen) { - modeList << QLatin1String("NotOpen"); + modeList << "NotOpen"_L1; } else { if (modes & QIODevice::ReadOnly) - modeList << QLatin1String("ReadOnly"); + modeList << "ReadOnly"_L1; if (modes & QIODevice::WriteOnly) - modeList << QLatin1String("WriteOnly"); + modeList << "WriteOnly"_L1; if (modes & QIODevice::Append) - modeList << QLatin1String("Append"); + modeList << "Append"_L1; if (modes & QIODevice::Truncate) - modeList << QLatin1String("Truncate"); + modeList << "Truncate"_L1; if (modes & QIODevice::Text) - modeList << QLatin1String("Text"); + modeList << "Text"_L1; if (modes & QIODevice::Unbuffered) - modeList << QLatin1String("Unbuffered"); + modeList << "Unbuffered"_L1; } std::sort(modeList.begin(), modeList.end()); - debug << modeList.join(QLatin1Char('|')); + debug << modeList.join(u'|'); debug << ')'; return debug; } |