summaryrefslogtreecommitdiffstats
path: root/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp')
-rw-r--r--tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp
index a496b5bfb9..81b50c1084 100644
--- a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp
+++ b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2014 John Layt <jlayt@kde.org>
-// 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 <QMimeType>
@@ -25,16 +25,17 @@ void tst_QPrintDevice::basics()
QSKIP("Could not load platform plugin");
QString defaultId = ps->defaultPrintDeviceId();
+ const QStringList availableIds = ps->availablePrintDeviceIds();
if (defaultId.isEmpty()) {
qDebug() << "No default printer found";
} else {
- QVERIFY(ps->availablePrintDeviceIds().contains(defaultId));
+ QVERIFY(availableIds.contains(defaultId));
}
- qDebug() << "Available Printer IDs :" << ps->availablePrintDeviceIds();
+ qDebug() << "Available Printer IDs :" << availableIds;
// Just exercise the api for now as we don't know what is installed
- foreach (const QString id, ps->availablePrintDeviceIds()) {
+ for (const QString &id : availableIds) {
QPrintDevice printDevice = ps->createPrintDevice(id);
const char quote = id == defaultId ? '*' : '"';
qDebug().noquote().nospace() << "\nCreated printer " << quote << id