summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-25 12:56:07 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-25 12:44:41 +0000
commit032971af2f15de231658eebdb12e5f821132238e (patch)
tree027e910272fcb893342f3a865f3d5f327a334ea0 /tests
parent5cd4001bf2a7f0894c6ac269860e833b02df6cde (diff)
tests/manual,auto/qstorageinfo: Use function pointer in print helper
Fix warning about unused variable printer in auto-test and redirects output to qInfo() as intended. Amends change a26435d65ceac5d714d5cc7d5af2326e162d7a41. Change-Id: Ia72a93267a54b9c4f9ef37fa058b95ef586ecc75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qstorageinfo/printvolumes.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/qstorageinfo/printvolumes.cpp b/tests/manual/qstorageinfo/printvolumes.cpp
index 1b1660b433..6089d5120a 100644
--- a/tests/manual/qstorageinfo/printvolumes.cpp
+++ b/tests/manual/qstorageinfo/printvolumes.cpp
@@ -42,17 +42,17 @@ void printVolumes(const QList<QStorageInfo> &volumes, int (*printer)(const char
// 214958080 39088272 4096 /
// /dev/disk1s2 (hfs) RW 488050672 419909696 4096 Macintosh HD2 /Volumes/Macintosh HD2
- printf("Filesystem (Type) Size Available BSize Label Mounted on\n");
+ printer("Filesystem (Type) Size Available BSize Label Mounted on\n");
foreach (const QStorageInfo &info, volumes) {
QByteArray fsAndType = info.device();
if (info.fileSystemType() != fsAndType)
fsAndType += " (" + info.fileSystemType() + ')';
- printf("%-19s R%c ", fsAndType.constData(), info.isReadOnly() ? 'O' : 'W');
+ printer("%-19s R%c ", fsAndType.constData(), info.isReadOnly() ? 'O' : 'W');
if (fsAndType.size() > 19)
- printf("\n%23s", "");
+ printer("\n%23s", "");
- printf("%10llu %10llu %5u ", info.bytesTotal() / 1024, info.bytesFree() / 1024, info.blockSize());
- printf("%-16s %s\n", qPrintable(info.name()), qPrintable(info.rootPath()));
+ printer("%10llu %10llu %5u ", info.bytesTotal() / 1024, info.bytesFree() / 1024, info.blockSize());
+ printer("%-16s %s\n", qPrintable(info.name()), qPrintable(info.rootPath()));
}
}