diff --git a/src/corelib/text/qstringconverter_p.h b/src/corelib/text/qstringconverter_p.h index 5929fe08000..e8012726467 100644 --- a/src/corelib/text/qstringconverter_p.h +++ b/src/corelib/text/qstringconverter_p.h @@ -306,6 +306,7 @@ struct Q_CORE_EXPORT QLocal8Bit static int checkUtf8(); static bool isUtf8() { + Q_CONSTINIT static QBasicAtomicInteger result = { 0 }; int r = result.loadRelaxed(); if (r == 0) {