diff --git a/tests/manual/qstorageinfo/main.cpp b/tests/manual/qstorageinfo/main.cpp index a2fd95129c7..5c01a151133 100644 --- a/tests/manual/qstorageinfo/main.cpp +++ b/tests/manual/qstorageinfo/main.cpp @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) QStringList args = a.arguments(); args.takeFirst(); // skip application name - foreach (const QString &path, args) { + for (const QString &path : std::as_const(args)) { QStorageInfo info(path); if (!info.isValid()) { // no error string... diff --git a/tests/manual/qstorageinfo/printvolumes.cpp b/tests/manual/qstorageinfo/printvolumes.cpp index 5e4fdd4863d..538f1ea603c 100644 --- a/tests/manual/qstorageinfo/printvolumes.cpp +++ b/tests/manual/qstorageinfo/printvolumes.cpp @@ -13,7 +13,7 @@ void printVolumes(const QList &volumes, int (*printer)(const char // /dev/disk1s2 (hfs) RW 488050672 419909696 4096 Macintosh HD2 /Volumes/Macintosh HD2 printer("Filesystem (Type) Size Available BSize Label Mounted on\n"); - foreach (const QStorageInfo &info, volumes) { + for (const QStorageInfo &info : volumes) { QByteArray fsAndType = info.device(); if (info.fileSystemType() != fsAndType) fsAndType += " (" + info.fileSystemType() + ')';