QtCore: stop using QLatin1Char constructor for creating char literals

Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

Change-Id: Ibe32a11699f67df2aa80505ba2944f33e5e823e0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Sona Kurazyan 2022-04-08 14:54:18 +02:00
parent b49f7e064c
commit 748e759df8
6 changed files with 24 additions and 24 deletions

View File

@ -225,18 +225,18 @@ public:
constexpr static inline QChar listSeparator() noexcept
{
#if defined(Q_OS_WIN)
return QLatin1Char(';');
return u';';
#else
return QLatin1Char(':');
return u':';
#endif
}
static QChar separator()
{
#if defined(Q_OS_WIN)
return QLatin1Char('\\');
return u'\\';
#else
return QLatin1Char('/');
return u'/';
#endif
}

View File

@ -71,7 +71,7 @@ public:
static QStringList platformSelectors();
static void addStatics(const QStringList &); //For loading GUI statics from other Qt modules
static QString selectionHelper(const QString &path, const QString &fileName,
const QStringList &selectors, const QChar &indicator = QLatin1Char('+'));
const QStringList &selectors, const QChar &indicator = u'+');
QFileSelectorPrivate();
QString select(const QString &filePath) const;

View File

@ -141,7 +141,7 @@ inline QString QSettingsGroup::toString() const
QString result;
result = str;
if (num > 0) {
result += QLatin1Char('/');
result += u'/';
result += QString::number(num);
}
return result;

View File

@ -1071,7 +1071,7 @@ literal_content_start ::= SPACE;
/.
case $rule_number:
if (normalizeLiterals)
textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' ');
textBuffer.data()[textBuffer.size()-1] = u' ';
break;
./

View File

@ -695,7 +695,7 @@ bool QXmlStreamReaderPrivate::parse()
case 173:
if (normalizeLiterals)
textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' ');
textBuffer.data()[textBuffer.size()-1] = u' ';
break;
case 174:

View File

@ -532,35 +532,35 @@ public:
[[nodiscard]] inline QChar &back();
[[nodiscard]] QString arg(qlonglong a, int fieldwidth=0, int base=10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(qulonglong a, int fieldwidth=0, int base=10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(long a, int fieldwidth=0, int base=10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(ulong a, int fieldwidth=0, int base=10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(int a, int fieldWidth = 0, int base = 10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(uint a, int fieldWidth = 0, int base = 10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(short a, int fieldWidth = 0, int base = 10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(ushort a, int fieldWidth = 0, int base = 10,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(double a, int fieldWidth = 0, char format = 'g', int precision = -1,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(char a, int fieldWidth = 0,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(QChar a, int fieldWidth = 0,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
#if QT_STRINGVIEW_LEVEL < 2
[[nodiscard]] QString arg(const QString &a, int fieldWidth = 0,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
#endif
[[nodiscard]] QString arg(QStringView a, int fieldWidth = 0,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
[[nodiscard]] QString arg(QLatin1StringView a, int fieldWidth = 0,
QChar fillChar = QLatin1Char(' ')) const;
QChar fillChar = u' ') const;
private:
template <typename T>
struct is_convertible_to_view_or_qstring_helper
@ -691,8 +691,8 @@ public:
bool isUpper() const;
bool isLower() const;
[[nodiscard]] QString leftJustified(qsizetype width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
[[nodiscard]] QString rightJustified(qsizetype width, QChar fill = QLatin1Char(' '), bool trunc = false) const;
[[nodiscard]] QString leftJustified(qsizetype width, QChar fill = u' ', bool trunc = false) const;
[[nodiscard]] QString rightJustified(qsizetype width, QChar fill = u' ', bool trunc = false) const;
#if !defined(Q_CLANG_QDOC)
[[nodiscard]] QString toLower() const &