Skip to content

Commit

Permalink
QWindowsFontDatabase: use categorized logging more
Browse files Browse the repository at this point in the history
Use "qt.qpa.fonts" logging category for the rest warning messages in
QWindowsFontDatabase.

Task-number: QTBUG-129118
Pick-to: 6.8
Change-Id: I4e84af29fb6385142285954b0f508b412823c679
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
  • Loading branch information
VladimirBelyavsky committed Sep 19, 2024
1 parent cc3b419 commit 450f79e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/text/windows/qwindowsfontdatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ QT_WARNING_POP

QString actualFontName = font.changeFamilyName(uniqueFamilyName);
if (actualFontName.isEmpty()) {
qWarning("%s: Can't change family name of font", __FUNCTION__);
qCWarning(lcQpaFonts, "%s: Can't change family name of font", __FUNCTION__);
return 0;
}

Expand All @@ -786,7 +786,7 @@ QT_WARNING_POP
}

if (fontHandle == 0) {
qWarning("%s: AddFontMemResourceEx failed", __FUNCTION__);
qCWarning(lcQpaFonts, "%s: AddFontMemResourceEx failed", __FUNCTION__);
} else {
QFontDef request;
request.families = QStringList(uniqueFamilyName);
Expand All @@ -801,7 +801,7 @@ QT_WARNING_POP

if (fontEngine) {
if (request.families != fontEngine->fontDef.families) {
qWarning("%s: Failed to load font. Got fallback instead: %s", __FUNCTION__,
qCWarning(lcQpaFonts, "%s: Failed to load font. Got fallback instead: %s", __FUNCTION__,
qPrintable(fontEngine->fontDef.families.constFirst()));
if (fontEngine->ref.loadRelaxed() == 0)
delete fontEngine;
Expand Down Expand Up @@ -1262,7 +1262,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
directWriteFontFace->Release();
} else if (useDw) {
const QString errorString = qt_error_string(int(hr));
qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
qCWarning(lcQpaFonts).noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
<< errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
}

Expand Down

0 comments on commit 450f79e

Please sign in to comment.