summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io/qfile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/corelib/io/qfile')
-rw-r--r--tests/benchmarks/corelib/io/qfile/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp14
2 files changed, 8 insertions, 13 deletions
diff --git a/tests/benchmarks/corelib/io/qfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt
index 0d77bae94b..0cd6b5fb16 100644
--- a/tests/benchmarks/corelib/io/qfile/CMakeLists.txt
+++ b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt
@@ -1,7 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-# Generated from qfile.pro.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_bench_qfile Binary:
@@ -15,9 +13,6 @@ qt_internal_add_benchmark(tst_bench_qfile
Qt::Test
)
-#### Keys ignored in scope 1:.:.:qfile.pro:<TRUE>:
-# TEMPLATE = "app"
-
## Scopes:
#####################################################################
diff --git a/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp b/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
index ea25a3fa98..b805726f5f 100644
--- a/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
+++ b/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 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 <QDebug>
#include <QTemporaryFile>
@@ -508,13 +508,13 @@ void tst_qfile::readSmallFiles()
}
QBENCHMARK {
- for (QFile *const file : qAsConst(fileList)) {
+ for (QFile *const file : std::as_const(fileList)) {
while (!file->atEnd())
file->read(buffer, blockSize);
}
}
- for (QFile *const file : qAsConst(fileList)) {
+ for (QFile *const file : std::as_const(fileList)) {
file->close();
delete file;
}
@@ -530,11 +530,11 @@ void tst_qfile::readSmallFiles()
}
QBENCHMARK {
- for (QFSFileEngine *const fse : qAsConst(fileList))
+ for (QFSFileEngine *const fse : std::as_const(fileList))
while (fse->read(buffer, blockSize)) {}
}
- for (QFSFileEngine *const fse : qAsConst(fileList)) {
+ for (QFSFileEngine *const fse : std::as_const(fileList)) {
fse->close();
delete fse;
}
@@ -547,14 +547,14 @@ void tst_qfile::readSmallFiles()
fileList.append(::fopen(QFile::encodeName(tempDir.filePath(file)).constData(), "rb"));
QBENCHMARK {
- for (FILE *const cfile : qAsConst(fileList)) {
+ for (FILE *const cfile : std::as_const(fileList)) {
while (!feof(cfile))
[[maybe_unused]] auto f = ::fread(buffer, blockSize, 1, cfile);
::fseek(cfile, 0, SEEK_SET);
}
}
- for (FILE *const cfile : qAsConst(fileList))
+ for (FILE *const cfile : std::as_const(fileList))
::fclose(cfile);
}
break;