QFontDatabase: use categorized logging more
Use "qt.text.font.db" logging category to print OpenType related warnings during loading a font engine. Also, as a drive-by change, use qUtf16Printable() to avoid unneeded allocations. Task-number: QTBUG-129092 Change-Id: If603aa1251c0073aec7bb0ba75d3e5e9e0385ac1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 0c7a89f55e216d1f679fedf17f6d014ca722f735) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a3df6c36db
commit
6a2035d970
@ -733,8 +733,8 @@ QFontEngine *QFontDatabasePrivate::loadSingleEngine(int script,
|
||||
if (engine) {
|
||||
// Also check for OpenType tables when using complex scripts
|
||||
if (Q_UNLIKELY(!engine->supportsScript(QChar::Script(script)))) {
|
||||
qWarning(" OpenType support missing for \"%s\", script %d",
|
||||
qPrintable(def.families.constFirst()), script);
|
||||
qCWarning(lcFontDb, "OpenType support missing for \"%ls\", script %d",
|
||||
qUtf16Printable(def.families.constFirst()), script);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -758,8 +758,8 @@ QFontEngine *QFontDatabasePrivate::loadSingleEngine(int script,
|
||||
if (engine) {
|
||||
// Also check for OpenType tables when using complex scripts
|
||||
if (!engine->supportsScript(QChar::Script(script))) {
|
||||
qWarning(" OpenType support missing for \"%s\", script %d",
|
||||
+qPrintable(def.families.constFirst()), script);
|
||||
qCWarning(lcFontDb, "OpenType support missing for \"%ls\", script %d",
|
||||
qUtf16Printable(def.families.constFirst()), script);
|
||||
if (engine->ref.loadRelaxed() == 0)
|
||||
delete engine;
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user