From 8cccf0a76b82726ce987690d783a1b912aa6bba5 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 8 Jun 2020 16:50:01 +0200 Subject: Remove deprecated methods and address some ### Qt 6 comments in gui/text Change-Id: If1ed58ecbb13df88bdb1d72caccfd01c14d42eac Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextformat.cpp | 48 -------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'src/gui/text/qtextformat.cpp') diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 2d771aa2ec..75f8c8fb8b 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -1842,20 +1842,6 @@ void QTextCharFormat::setUnderlineStyle(UnderlineStyle style) none has been set. */ - -#if QT_DEPRECATED_SINCE(5, 13) -/*! - \fn void QTextCharFormat::setAnchorName(const QString &name) - \obsolete - - This function is deprecated. Use setAnchorNames() instead. - - Sets the text format's anchor \a name. For the anchor to work as a - hyperlink, the destination must be set with setAnchorHref() and - the anchor must be enabled with setAnchor(). -*/ -#endif - /*! \fn void QTextCharFormat::setAnchorNames(const QStringList &names) \since 4.3 @@ -1865,28 +1851,6 @@ void QTextCharFormat::setUnderlineStyle(UnderlineStyle style) the anchor must be enabled with setAnchor(). */ -#if QT_DEPRECATED_SINCE(5, 13) -/*! - \fn QString QTextCharFormat::anchorName() const - \obsolete - - This function is deprecated. Use anchorNames() instead. - - Returns the anchor name associated with this text format, or an empty - string if none has been set. If the anchor name is set, text with this - format can be the destination of a hypertext link. -*/ -QString QTextCharFormat::anchorName() const -{ - QVariant prop = property(AnchorName); - if (prop.userType() == QMetaType::QStringList) - return prop.toStringList().value(0); - else if (prop.userType() != QMetaType::QString) - return QString(); - return prop.toString(); -} -#endif - /*! \fn QStringList QTextCharFormat::anchorNames() const \since 4.3 @@ -1991,18 +1955,6 @@ QStringList QTextCharFormat::anchorNames() const \sa setFont() */ -/*! - \overload - - Sets the text format's \a font. - - \sa font() -*/ -void QTextCharFormat::setFont(const QFont &font) -{ - setFont(font, FontPropertiesAll); -} - /*! \since 5.3 -- cgit v1.2.1