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
Change-Id: I29738e7411d241c26a4b2e1dd91d0af867fcc111
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 08b0a63a0ffd5e3b4aeb0a789663d5200fd217bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Andrei Golubev 2021-11-30 16:46:13 +01:00 committed by Qt Cherry-pick Bot
parent 7d6f5e8f10
commit 2a36dbce7d

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