tst_QFileInfo: don't trigger libstdc++ std::filesystem bug

libstdc++'s std::filesystem::path implementation incorrectly assumes
that any 8-bit char input is UTF-8, when it patently isn't on Windows.

Reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111244

Fixes: QTBUG-116609
Change-Id: I2b24e1d3cad44897906efffd17803f2862935c9b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2b06d41b46cf97a92dee10c4432cdc5c719bcee0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2023-08-30 12:15:02 -07:00 committed by Qt Cherry-pick Bot
parent f326d50e72
commit 641459e986

View File

@ -2322,7 +2322,10 @@ void tst_QFileInfo::stdfilesystem()
COMPARE_CONSTRUCTION("/path/TO/file.txt");
COMPARE_CONSTRUCTION("./path/TO/file.txt");
COMPARE_CONSTRUCTION("../file.txt");
#if !(defined(__GLIBCXX__) && defined(Q_OS_WIN32))
// libstdc++ bug on Windows - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111244
COMPARE_CONSTRUCTION("./filæ.txt");
#endif
#undef COMPARE_CONSTRUCTION
{