Fix application font removal when using FontConfig
authorFabian Bumberger <fbumberger@rim.com>
Thu, 9 Jan 2014 00:57:41 +0000 (01:57 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 28 Jan 2014 18:32:40 +0000 (19:32 +0100)
commita4ff400e25c76a32ec8252285dda043f07b19c15
treee0131340c8313c1e667e05e7a51ff7f4930d86ec
parent22ec4ed86664ab795d2fa47245645b6a73018039
Fix application font removal when using FontConfig

This patch fixes an issue when a font that was added with QFontDatabase::addApplicationFont
can not be removed any more.
The reason for that is that QFontconfigDatabase::addApplicationFont adds the font to the FontConfig
application set from where it cannot be removed any more and is picked up every time the font database is
repopulated (e.g. after a call to QFontDatabase::removeApplicationFont).

This also fixes the QFontDatabase autotest which unfortunately does not fail on linux, because it tries
to add "FreeMono" (which in most cases is already there as a system font). So this patch removes FreeMono and adds
LED_REAL as test font.

Change-Id: I2fa5f4df0ad2099ac28673760ea25234c725dfc6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
tests/auto/gui/text/qfontdatabase/FreeMono.ttf [deleted file]
tests/auto/gui/text/qfontdatabase/LED_REAL.TTF [new file with mode: 0644]
tests/auto/gui/text/qfontdatabase/LED_REAL_readme.txt [new file with mode: 0644]
tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp