diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-31 13:10:18 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-31 14:31:31 +0200 |
commit | 112a4af10741409b3d8503cb77852a777b607ce0 (patch) | |
tree | fa99f0f37fc1505522fe9368e95484c7732ccda8 /tests/auto/printsupport/kernel/qprinterinfo | |
parent | 29ef0d2bccd1874e20de94485ee05777c3a95c5d (diff) | |
parent | e938150412d22e61926fe16791158805b71268bb (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
examples/examples.pro
qmake/library/qmakebuiltins.cpp
src/corelib/global/qglobal.cpp
Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
src/corelib/global/qnamespace.qdoc
src/corelib/global/qrandom.cpp
src/gui/kernel/qwindow.cpp
Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
src/network/ssl/qsslkey_openssl.cpp
src/plugins/platforms/android/androidjniinput.cpp
src/plugins/platforms/xcb/qxcbconnection.cpp
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/widgets/widgets/qmenu.cpp
tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
Diffstat (limited to 'tests/auto/printsupport/kernel/qprinterinfo')
-rw-r--r-- | tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp index c20fafe158..92a06cda00 100644 --- a/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp +++ b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp @@ -136,7 +136,7 @@ QStringList tst_QPrinterInfo::getPrintersFromSystem() #ifdef Q_OS_UNIX // This function does roughly the same as the `command substitution` in // the shell. -QString tst_QPrinterInfo::getOutputFromCommand(const QStringList& command) +QString getOutputFromCommandInternal(const QStringList &command) { // The command execution does nothing on non-unix systems. int pid; @@ -194,6 +194,16 @@ QString tst_QPrinterInfo::getOutputFromCommand(const QStringList& command) return QString(array); } } + +QString tst_QPrinterInfo::getOutputFromCommand(const QStringList &command) +{ + // Forces the ouptut from the command to be in English + const QByteArray origSoftwareEnv = qgetenv("SOFTWARE"); + qputenv("SOFTWARE", QByteArray()); + QString output = getOutputFromCommandInternal(command); + qputenv("SOFTWARE", origSoftwareEnv); + return output; +} #endif // Windows test support not yet implemented |