diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-06-13 17:04:22 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-04-03 13:59:47 +0000 |
commit | 7ab84cfe74f8d525f8099c2739f80681c3c6a428 (patch) | |
tree | 73814c2f3a07c733ddfe86b7fc6bc7d59eff7301 | |
parent | a1e62e7ba14b00ac7c361936a18e7bc42bf1286d (diff) |
factorial example: Fix issue with WinRT console output
Replaced the display of the calculation output, generated using
fprintf(stdout, ...), with qInfo() << ... In WinRT, fprintf to stdout
does not cause output to be generated.
Task-number: QTBUG-67566
Change-Id: I3b95bbf888e863683cbaf54deb26c3821433a5b8
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
-rw-r--r-- | examples/widgets/statemachine/factorial/main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/widgets/statemachine/factorial/main.cpp b/examples/widgets/statemachine/factorial/main.cpp index 2d25822828..e9431596fe 100644 --- a/examples/widgets/statemachine/factorial/main.cpp +++ b/examples/widgets/statemachine/factorial/main.cpp @@ -49,7 +49,6 @@ ****************************************************************************/ #include <QtCore> -#include <stdio.h> //! [0] class Factorial : public QObject @@ -143,7 +142,7 @@ public: void onTransition(QEvent *) override { - fprintf(stdout, "%d\n", m_fact->property("fac").toInt()); + qInfo() << m_fact->property("fac").toInt(); } private: |