mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user