summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-05-03 13:45:53 +0200
committerAapo Keskimolo <aapo.keskimolo@qt.io>2019-05-07 07:24:00 +0000
commitac68ef1efc27669e9c8fc255298345d72d198d68 (patch)
treeee85130d275ef2ce93ce559b458ab7b25faf6801 /src
parent22c1e10e1955c63e3b1761e05ce06164c0464073 (diff)
Don't duplicate font family names in the fallback list
Fixes: QTBUG-75333 Change-Id: Iaaf4b13d50c6b9b52e629b81d5e9cbc552a0202c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qfontdatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index fa9573441a..6dad5196e8 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -707,7 +707,8 @@ static QStringList familyList(const QFontDef &req)
if ((str.startsWith(QLatin1Char('"')) && str.endsWith(QLatin1Char('"')))
|| (str.startsWith(QLatin1Char('\'')) && str.endsWith(QLatin1Char('\''))))
str = str.mid(1, str.length() - 2);
- family_list << str.toString();
+ if (!family_list.contains(str))
+ family_list << str.toString();
}
}
// append the substitute list for each family in family_list