From 08b0a63a0ffd5e3b4aeb0a789663d5200fd217bb Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Tue, 30 Nov 2021 16:46:13 +0100 Subject: [PATCH] QFontDatabase: unify relevant documentation pieces addApplicationFont and addApplicationFontFromData basically do the same thing (with one reading the data from a file and another reading it directly from QByteArray) The documentation is not quite identical, so fix that by using \include magic of qdoc As a drive-by, remove outdated \note within addApplicationFont() description Fixes: QTBUG-98752 Pick-to: 5.15 6.2 Change-Id: I29738e7411d241c26a4b2e1dd91d0af867fcc111 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontdatabase.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 8f98d9defc1..887fb8eb2e7 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2196,13 +2196,12 @@ bool QFontDatabasePrivate::isApplicationFont(const QString &fileName) with removeApplicationFont() or to retrieve the list of family names contained in the font. +//! [add-application-font-doc] The function returns -1 if the font could not be loaded. Currently only TrueType fonts, TrueType font collections, and OpenType fonts are supported. - - \note Adding application fonts on Unix/X11 platforms without fontconfig is - currently not supported. +//! [add-application-font-doc] \sa addApplicationFontFromData(), applicationFontFamilies(), removeApplicationFont() */ @@ -2230,12 +2229,7 @@ int QFontDatabase::addApplicationFont(const QString &fileName) with removeApplicationFont() or to retrieve the list of family names contained in the font. - The function returns -1 if the font could not be loaded. - - Currently only TrueType fonts and TrueType font collections are supported. - - \b{Note:} Adding application fonts on Unix/X11 platforms without fontconfig is - currently not supported. + \include qfontdatabase.cpp add-application-font-doc \sa addApplicationFont(), applicationFontFamilies(), removeApplicationFont() */