summaryrefslogtreecommitdiffstats
path: root/tests/auto/printsupport/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/printsupport/kernel')
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp
index efd9e77455..eb9772f5d3 100644
--- a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp
+++ b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp
@@ -115,12 +115,10 @@ QStringList tst_QPrinterInfo::getPrintersFromSystem()
// TODO "cscript c:\windows\system32\prnmngr.vbs -l"
#endif // Q_OS_WIN32
#ifdef Q_OS_UNIX
- QStringList command;
- command << "lpstat" << "-p";
- QString output = getOutputFromCommand(command);
+ QString output = getOutputFromCommand({ "lpstat", "-e" });
QStringList list = output.split(QChar::fromLatin1('\n'));
- QRegularExpression reg("^[Pp]rinter ([.a-zA-Z0-9-_@]+)");
+ QRegularExpression reg("^([.a-zA-Z0-9-_@]+)");
QRegularExpressionMatch match;
for (int c = 0; c < list.size(); ++c) {
match = reg.match(list[c]);