tst_Q*Application: suppress warning about using read() with MSVC

MSVC is pedantic that read() (a POSIX function) is not an ISO C function
so insists that we use the underscored version. As if Microsoft followed
that rule for their own APIs...

Amends e6a6757c1485d09a4b7a124d67260f06d8022fef.

Pick-to: 6.8
Change-Id: If51fd8564a3c415e1f7efffd7fde18a830c97e3b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9ffbeae50e768c37865ec08e7d8716b9fa75f575)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2025-04-09 11:14:46 -07:00 committed by Qt Cherry-pick Bot
parent 1f2565e96d
commit 09747e064e

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <private/qcoreapplication_p.h>
#include <qplatformdefs.h>
#include <qthread.h>
#include <qtimer.h>
@ -62,7 +63,7 @@ static int exitFromThread(int argc, char **argv)
// block the GUI forever, otherwise the unloading of the QPA plugins
// could cause a crash if something is running.
char c;
int r = read(STDIN_FILENO, &c, 1);
int r = QT_READ(STDIN_FILENO, &c, 1);
Q_UNUSED(r);
});
app.exec();