Bug 422749

Summary: QSystemLocale has become private API in Qt 5.15, kswitchlanguagedialog_p.cpp
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Sebastian Engel <kde>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: 5.70.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sebastian Engel 2020-06-10 14:21:58 UTC
SUMMARY

QSystemLocale has become private API in Qt 5.15, 
https://doc.qt.io/qt-5/sourcebreaks.html

Therefore kxmlgui/src/kswitchlanguagedialog_p.cpp:97 has an undefined reference to QSystemLocale.





STEPS TO REPRODUCE
1. compile kxmlgui against Qt5.15


OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: opensuse tumbleweed 20200604
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70
Qt Version: 5.15.0

ADDITIONAL INFORMATION

The respective line in the source has the following comment:

        // Ideally setting the LANGUAGE would change the default QLocale too
        // but unfortunately this is too late since the QCoreApplication constructor
        // already created a QLocale at this stage so we need to set the reset it
        // by triggering the creation and destruction of a QSystemLocale
        // this is highly dependant on Qt internals, so may break, but oh well
        QSystemLocale *dummy = new QSystemLocale();
        delete dummy;


could a locale handler address this issue? Such as: https://developer.blackberry.com/native/reference/cascades/bb__cascades__localehandler.html
Comment 1 Christoph Cullmann 2024-09-22 18:06:40 UTC
The current version of KF5 seems to compile and link fine.