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>
This commit is contained in:
parent
a1e62e7ba1
commit
7ab84cfe74
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user