QFont: don't detach the families list in family()

Change-Id: Id0fb9ab0089845ee8843fffd16f93a8b9306b89b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 68a1f9582b38b30add7c061caae1fd8acb356da9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2022-06-16 15:31:49 -07:00 committed by Qt Cherry-pick Bot
parent 9da1762f7e
commit b6e4456f1f

View File

@ -784,7 +784,7 @@ QFont &QFont::operator=(const QFont &font)
*/
QString QFont::family() const
{
return d->request.families.isEmpty() ? QString() : d->request.families.first();
return d->request.families.isEmpty() ? QString() : d->request.families.constFirst();
}
/*!