Utils: Silence MSVC deprecation warnings in tst_qtcprocess

warning: C4996: 'setmode': The POSIX name for this item is deprecated.
Instead, use the ISO C and C++ conformant name: _setmode. See online
help for details.

...same for 'fileno'

Change-Id: I85090b65532b17b535914b88de835d718f654f6a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2022-03-10 09:39:33 +01:00
parent e1ebbbf480
commit a863958aa4

View File

@@ -1017,7 +1017,7 @@ void tst_QtcProcess::LineCallback::main()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Prevent \r\n -> \r\r\n translation. // Prevent \r\n -> \r\r\n translation.
setmode(fileno(stderr), O_BINARY); _setmode(_fileno(stderr), O_BINARY);
#endif #endif
fprintf(stderr, "%s", QByteArray(lineCallbackData).replace('|', "").data()); fprintf(stderr, "%s", QByteArray(lineCallbackData).replace('|', "").data());
exit(0); exit(0);