During construction of a QStyle, QApplication might not yet be initialized, e.g. when calling QApplication::setStyle("macOS") before constructing QApplication. In that case, we cannot access the platform theme. We don't just want to skip initializing the small font either though. Store the smallSystemFont as a std::optional so that we can initialize it once, when the first widget gets polished. As a drive-by, remove the unused miniSystemFont variable. Fixes: QTBUG-108047 Change-Id: Id750770a563611fdbc6c7031fe102a99ea692be7 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> (cherry picked from commit 2bdc027f5c6be9c551d40c80e510b19b6e2939a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%