Use QStringList::join(QChar) overload where applicable [QtCore]

This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: I81c378ef6aeeada5e116f1394cc9fc67f901ffd6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Marc Mutz 2012-05-18 20:00:23 +02:00 committed by The Qt Project
parent 6d65b2cc8c
commit c00bd8d677
5 changed files with 7 additions and 7 deletions

View File

@ -2255,7 +2255,7 @@ QDebug operator<<(QDebug debug, QDir::Filters filters)
if (filters & QDir::System) flags << QLatin1String("System");
if (filters & QDir::CaseSensitive) flags << QLatin1String("CaseSensitive");
}
debug << "QDir::Filters(" << qPrintable(flags.join(QLatin1String("|"))) << ')';
debug << "QDir::Filters(" << qPrintable(flags.join(QLatin1Char('|'))) << ')';
return debug;
}
@ -2278,7 +2278,7 @@ static QDebug operator<<(QDebug debug, QDir::SortFlags sorting)
if (sorting & QDir::Type) flags << QLatin1String("Type");
debug << "QDir::SortFlags(" << qPrintable(type)
<< '|'
<< qPrintable(flags.join(QLatin1String("|"))) << ')';
<< qPrintable(flags.join(QLatin1Char('|'))) << ')';
}
return debug;
}
@ -2287,7 +2287,7 @@ QDebug operator<<(QDebug debug, const QDir &dir)
{
debug.maybeSpace() << "QDir(" << dir.path()
<< ", nameFilters = {"
<< qPrintable(dir.nameFilters().join(QLatin1String(",")))
<< qPrintable(dir.nameFilters().join(QLatin1Char(',')))
<< "}, "
<< dir.sorting()
<< ','

View File

@ -1687,7 +1687,7 @@ QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)
modeList << QLatin1String("Unbuffered");
}
qSort(modeList);
debug << modeList.join(QLatin1String("|"));
debug << modeList.join(QLatin1Char('|'));
debug << ')';
return debug;
}

View File

@ -399,7 +399,7 @@ QMacSettingsPrivate::QMacSettingsPrivate(QSettings::Scope scope, const QString &
const QString &bundle_identifier_component = bundle_identifier_components.at(i);
bundle_identifier_components_reversed.push_front(bundle_identifier_component);
}
domainName = bundle_identifier_components_reversed.join(QLatin1String("."));
domainName = bundle_identifier_components_reversed.join(QLatin1Char('.'));
}
}
}

View File

@ -581,7 +581,7 @@ void tst_QMimeDatabase::suffixes()
expectedPatterns.sort();
QStringList mimePatterns = mime.globPatterns();
mimePatterns.sort();
QCOMPARE(mimePatterns.join(QLatin1String(";")), expectedPatterns.join(QLatin1String(";")));
QCOMPARE(mimePatterns.join(QLatin1Char(';')), expectedPatterns.join(QLatin1Char(';')));
QCOMPARE(mime.preferredSuffix(), preferredSuffix);
}

View File

@ -488,7 +488,7 @@ namespace QTest {
projectFile.write("\nCONFIG += release\n");
#endif
QByteArray extraSources = QFile::encodeName(extraProgramSources.join(" "));
QByteArray extraSources = QFile::encodeName(extraProgramSources.join(' '));
if (!extraSources.isEmpty()) {
projectFile.write("SOURCES += ");
projectFile.write(extraSources);