Replace QLatin1Literal with QLatin1String
QLatin1Literal is just alias of QLatin1String for Qt4 compatibility. So it's style cleanup patch. Change-Id: Ia3b3e5dc3169f13a1ef819d69be576b8a8bfb258 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
397f345a6a
commit
6dbb16a856
@ -199,7 +199,7 @@ private:
|
||||
QIconCacheGtkReader::QIconCacheGtkReader(const QString &dirName)
|
||||
: m_isValid(false)
|
||||
{
|
||||
QFileInfo info(dirName + QLatin1Literal("/icon-theme.cache"));
|
||||
QFileInfo info(dirName + QLatin1String("/icon-theme.cache"));
|
||||
if (!info.exists() || info.lastModified() < QFileInfo(dirName).lastModified())
|
||||
return;
|
||||
m_file.setFileName(info.absoluteFilePath());
|
||||
|
@ -61,10 +61,10 @@ static QString resolveFileName(QString fileName, QUrl *url, qreal targetDevicePi
|
||||
// Also, QFile{Info}::exists works only on filepaths (not urls)
|
||||
|
||||
if (url->isValid()) {
|
||||
if (url->scheme() == QLatin1Literal("qrc")) {
|
||||
if (url->scheme() == QLatin1String("qrc")) {
|
||||
fileName = fileName.right(fileName.length() - 3);
|
||||
}
|
||||
else if (url->scheme() == QLatin1Literal("file")) {
|
||||
else if (url->scheme() == QLatin1String("file")) {
|
||||
fileName = url->toLocalFile();
|
||||
}
|
||||
}
|
||||
|
@ -704,10 +704,10 @@ void QPSQLDriverPrivate::detectBackslashEscape()
|
||||
hasBackslashEscape = true;
|
||||
} else {
|
||||
hasBackslashEscape = false;
|
||||
PGresult* result = exec(QLatin1Literal("SELECT '\\\\' x"));
|
||||
PGresult* result = exec(QLatin1String("SELECT '\\\\' x"));
|
||||
int status = PQresultStatus(result);
|
||||
if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK)
|
||||
if (QString::fromLatin1(PQgetvalue(result, 0, 0)) == QLatin1Literal("\\"))
|
||||
if (QString::fromLatin1(PQgetvalue(result, 0, 0)) == QLatin1String("\\"))
|
||||
hasBackslashEscape = true;
|
||||
PQclear(result);
|
||||
}
|
||||
|
@ -228,22 +228,22 @@ QString QTeamCityLogger::tcEscapedString(const QString &str) const
|
||||
|
||||
switch (ch.toLatin1()) {
|
||||
case '\n':
|
||||
formattedString.append(QLatin1Literal("|n"));
|
||||
formattedString.append(QLatin1String("|n"));
|
||||
break;
|
||||
case '\r':
|
||||
formattedString.append(QLatin1Literal("|r"));
|
||||
formattedString.append(QLatin1String("|r"));
|
||||
break;
|
||||
case '|':
|
||||
formattedString.append(QLatin1Literal("||"));
|
||||
formattedString.append(QLatin1String("||"));
|
||||
break;
|
||||
case '[':
|
||||
formattedString.append(QLatin1Literal("|["));
|
||||
formattedString.append(QLatin1String("|["));
|
||||
break;
|
||||
case ']':
|
||||
formattedString.append(QLatin1Literal("|]"));
|
||||
formattedString.append(QLatin1String("|]"));
|
||||
break;
|
||||
case '\'':
|
||||
formattedString.append(QLatin1Literal("|'"));
|
||||
formattedString.append(QLatin1String("|'"));
|
||||
break;
|
||||
default:
|
||||
formattedString.append(ch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user