mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-03 18:44:13 +02:00
0fa2591c4f
Until now a font description that could not be parsed only produced console warnings most users never see, so nobody learned that their texts silently lost their formatting (see the reports in issue #553). Count in QETUtils::fontFromString() how many descriptions were salvaged from a foreign or corrupt format and how many stayed unreadable, and show a message box after opening a project when either happened: salvaged descriptions are rewritten in the stable format on the next save, unreadable ones fall back to the default font. Projects without font issues open exactly as before, and non-interactive opens only log the counters. Verified with a Qt 5.15 build on a project carrying 52 19-field and one 21-field description: the dialog reports 53 restored descriptions; the same file on a Qt 6.11 build (which parses those formats natively) shows no dialog. See issue #553.