summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/rcc/tst_rcc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/rcc/tst_rcc.cpp')
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index ad13cc2eeb..88a6e17e2f 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QTest>
#include <QLibraryInfo>
@@ -114,7 +114,7 @@ static QString doCompare(const QStringList &actual, const QStringList &expected,
ba.append("File " + fi.absoluteFilePath().toUtf8() + " does not exist!");
break;
}
- const quint64 timeStamp = quint64(fi.lastModified().toMSecsSinceEpoch());
+ const quint64 timeStamp = quint64(fi.lastModified(QTimeZone::UTC).toMSecsSinceEpoch());
expectedLine.clear();
for (int shift = 56; shift >= 0; shift -= 8) {
expectedLine.append(QLatin1String("0x"));
@@ -211,8 +211,8 @@ static QStringMap readExpectedFiles(const QString &fileName)
{
QStringMap expectedFiles;
- QStringList lines = readLinesFromFile(fileName, Qt::SkipEmptyParts);
- foreach (const QString &line, lines) {
+ const QStringList lines = readLinesFromFile(fileName, Qt::SkipEmptyParts);
+ for (const QString &line : lines) {
QString resourceFileName = line.section(QLatin1Char(' '), 0, 0, QString::SectionSkipEmpty);
QString actualFileName = line.section(QLatin1Char(' '), 1, 1, QString::SectionSkipEmpty);
expectedFiles[resourceFileName] = actualFileName;
@@ -276,8 +276,8 @@ void tst_rcc::binary_data()
QString localeFileName = absoluteBaseName + QLatin1String(".locale");
QFile localeFile(localeFileName);
if (localeFile.exists()) {
- QStringList locales = readLinesFromFile(localeFileName, Qt::SkipEmptyParts);
- foreach (const QString &locale, locales) {
+ const QStringList locales = readLinesFromFile(localeFileName, Qt::SkipEmptyParts);
+ for (const QString &locale : locales) {
QString expectedFileName = QString::fromLatin1("%1.%2.%3").arg(absoluteBaseName, locale, QLatin1String("expected"));
QStringMap expectedFiles = readExpectedFiles(expectedFileName);
QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1Char('_') + locale)) << rccFileName
@@ -473,7 +473,7 @@ void tst_rcc::cleanupTestCase()
QFileInfoList entries = dataDir.entryInfoList(QStringList() << QLatin1String("*.rcc"));
QDir dataDepDir(m_dataPath + QLatin1String("/depfile"));
entries += dataDepDir.entryInfoList({QLatin1String("*.d"), QLatin1String("*.qrc.cpp")});
- foreach (const QFileInfo &entry, entries)
+ for (const QFileInfo &entry : std::as_const(entries))
QFile::remove(entry.absoluteFilePath());
}