linuxdeepin / dtk

Portal of DTK documentations
https://linuxdeepin.github.io/dtk/
Other
26 stars 15 forks source link

查找的 QT_OS_VERSION 值异常 #185

Open rb-union opened 2 months ago

rb-union commented 2 months ago

SUMMARY | 问题概要

查找的 QT_OS_VERSION 值异常,大概Qt6.4之后 QCoreApplicationPrivate::initLocale() 失败会打印错误日志。 deepin-os-release 工具在处理时将其一同接收了,会使得 Q_OS_VERSION Q_OS_DEEPIN_VERSION 等定义不准确,影响工程编译。

DTK and OS VERSIONS | DTK&系统版本信息

Distribution: Uniontech OS Server 20 Enterprise Package: dtk6core: 6.0.16 Qt: 6.6.1+dfsg-5deepin3

Minimal Reproducible Case Code | 最小复现案例代码

find_package(Dtk6CMake REQUIRED)

if (${DEEPIN_OS_VERSION} MATCHES "23")
      message("do something", ${DEEPIN_OS_VERSION})
endif()

OBSERVED RESULT | 观察到的结果

OS: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Deepin, Version: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
23
Deepin OS Type: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Community
Deepin OS Version: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
23

EXPECTED RESULT | 期望的结果

屏蔽或过滤掉Qt的警告输出

ADDITIONAL INFORMATION | 额外补充

No response