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 <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Andrei Golubev 2021-11-30 16:46:13 +01:00
parent 020191d2ef
commit 08b0a63a0f

View File

@ -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()
*/