From 7ab84cfe74f8d525f8099c2739f80681c3c6a428 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Wed, 13 Jun 2018 17:04:22 +0200 Subject: 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 Reviewed-by: Maurice Kalinowski --- examples/widgets/statemachine/factorial/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/widgets/statemachine') 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 -#include //! [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: -- cgit v1.2.3