From 163265d5d633fe23da2130de1d82f36086234225 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 1 Apr 2024 09:49:07 +0300 Subject: [PATCH] remove redundant QFont::key() method Signed-off-by: Ivailo Monev --- src/gui/text/qfont.cpp | 15 ++------------- src/gui/text/qfont.h | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index c3014b5c3..6370efcbd 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -1163,18 +1163,6 @@ static inline void set_font_bits(quint8 bits, QFontPrivate *f) } #endif - -/*! - Returns the font's key, a textual representation of a font. It is - typically used as the key for a cache or dictionary of fonts. - - \sa QMap -*/ -QString QFont::key() const -{ - return toString(); -} - /*! Returns a description of the font. The description is a comma-separated list of the attributes, perfectly suited for use @@ -1216,8 +1204,9 @@ bool QFont::fromString(const QString &descrip) } setFamily(l[0]); - if (count > 1) + if (count > 1) { setStyleName(l[1]); + } if (count > 2) { const double l2 = l[2].toDouble(); if (l2 > 0.0) { diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h index 40e20f30f..53c086b63 100644 --- a/src/gui/text/qfont.h +++ b/src/gui/text/qfont.h @@ -157,8 +157,6 @@ public: FT_Face freetypeFace() const; #endif - QString key() const; - QString toString() const; bool fromString(const QString &);