diff options
author | Bernd Weimer <bweimer@blackberry.com> | 2013-07-29 17:34:24 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-30 09:56:40 +0200 |
commit | 983e921c541f6eaacb9abcddb8ec079ec5129cf1 (patch) | |
tree | 7aca2b2c9c7e524dd6703298cc5623aeac36f14d /tests/auto/corelib/io/qtextstream/stdinProcess | |
parent | cfb5dfb7e8ebceb37da3201ba2171ac063cbbd15 (diff) |
Fixed QTextStream "stdin" auto tests
On some platforms (like BlackBerry) qDebug doesn't write to stderr,
so we directly write to stderr with fprintf.
Change-Id: Ib86211c98cf4da1fa2dbea4600a78e2013dc1a5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qtextstream/stdinProcess')
-rw-r--r-- | tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp index e36a2aeda8..cb4e75c6a2 100644 --- a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp +++ b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp @@ -40,17 +40,16 @@ ****************************************************************************/ -#include <QtCore/QCoreApplication> #include <QtCore/QTextStream> +#include <stdio.h> -int main(int argc, char **argv) +int main(int, char**) { - QCoreApplication a(argc, argv); QTextStream qin(stdin); if (!qin.atEnd()) { - int a, b, c; - qin >> a >> b >> c; - qDebug("%d %d %d", a, b, c); + int a, b, c; + qin >> a >> b >> c; + fprintf(stderr, "%d %d %d\n", a, b, c); } return 0; } |