Guard Qt6-only deprecation replacements for Qt5 compatibility

Three deprecated APIs have replacements that only exist in newer Qt6:
- QLocale::nativeCountryName() -> nativeTerritoryName() (Qt 6.2)
- QDomDocument::setContent() overload -> ParseResult (Qt 6.5)
- qt_ntfs_permission_lookup -> QNtfsPermissionCheckGuard RAII (Qt 6.6)
Each is wrapped in QT_VERSION_CHECK so Qt5 keeps the old path. Clears
4 -Wdeprecated-declarations warnings.
This commit is contained in:
Dieter Mayer
2026-07-12 21:54:14 +02:00
parent f57c921b78
commit e099fca5ad
3 changed files with 19 additions and 0 deletions
+4
View File
@@ -150,7 +150,11 @@ void MachineInfo::send_info_to_debug()
qInfo()<< "";
qInfo()<< " OS System language:"<< QLocale::system().name();
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
qInfo()<< " OS System Native Country Name:"<< QLocale::system().nativeTerritoryName();
#else
qInfo()<< " OS System Native Country Name:"<< QLocale::system().nativeCountryName();
#endif
qInfo()<< " OS System Native Language Name:"<< QLocale::system().nativeLanguageName();
qInfo()<< "";
qInfo()<< " System language defined in QET configuration:"<< QString(QETApp::langFromSetting().toLatin1());