diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-10 17:05:10 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-23 09:58:57 +0200 |
commit | 11bad6109606794091adc3b8a14070ac09707f45 (patch) | |
tree | 603d07bada752a534a8549c6d008b9b8a4aa832a /src/gui | |
parent | a618c260ed0d1de711a5bc20337f9b8c3835c407 (diff) |
Deprecate QVariant::Type
It's been obsolete for a long time already. Make sure
the compiler now warns about it and remove all remaining
uses in qtbase.
Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 8 | ||||
-rw-r--r-- | src/gui/text/qtextformat.cpp | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index ff142794f6..0c5872a2f2 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2052,10 +2052,10 @@ void QTextDocument::print(QPagedPaintDevice *printer) const \value UnknownResource No resource is loaded, or the resource type is not known. \value HtmlResource The resource contains HTML. \value ImageResource The resource contains image data. - Currently supported data types are QVariant::Pixmap and - QVariant::Image. If the corresponding variant is of type - QVariant::ByteArray then Qt attempts to load the image using - QImage::loadFromData. QVariant::Icon is currently not supported. + Currently supported data types are QMetaType::QPixmap and + QMetaType::QImage. If the corresponding variant is of type + QMetaType::QByteArray then Qt attempts to load the image using + QImage::loadFromData. QMetaType::QIcon is currently not supported. The icon needs to be converted to one of the supported types first, for example using QIcon::pixmap. \value StyleSheetResource The resource contains CSS. diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index 850b4ad43d..444850039b 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -1036,7 +1036,7 @@ int QTextFormat::intProperty(int propertyId) const /*! Returns the value of the property specified by \a propertyId. If the - property isn't of QVariant::Double or QMetaType::Float type, 0 is + property isn't of QMetaType::Double or QMetaType::Float type, 0 is returned instead. \sa setProperty(), boolProperty(), intProperty(), stringProperty(), colorProperty(), @@ -1054,7 +1054,7 @@ qreal QTextFormat::doubleProperty(int propertyId) const /*! Returns the value of the property given by \a propertyId; if the - property isn't of QVariant::String type, an empty string is + property isn't of QMetaType::QString type, an empty string is returned instead. \sa setProperty(), boolProperty(), intProperty(), doubleProperty(), colorProperty(), @@ -1072,7 +1072,7 @@ QString QTextFormat::stringProperty(int propertyId) const /*! Returns the value of the property given by \a propertyId; if the - property isn't of QVariant::Color type, an invalid color is + property isn't of QMetaType::QColor type, an invalid color is returned instead. \sa setProperty(), boolProperty(), intProperty(), doubleProperty(), @@ -1090,7 +1090,7 @@ QColor QTextFormat::colorProperty(int propertyId) const /*! Returns the value of the property given by \a propertyId; if the - property isn't of QVariant::Pen type, Qt::NoPen is + property isn't of QMetaType::QPen type, Qt::NoPen is returned instead. \sa setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), @@ -1108,7 +1108,7 @@ QPen QTextFormat::penProperty(int propertyId) const /*! Returns the value of the property given by \a propertyId; if the - property isn't of QVariant::Brush type, Qt::NoBrush is + property isn't of QMetaType::QBrush type, Qt::NoBrush is returned instead. \sa setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), |