summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-06-15 09:09:08 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-15 10:56:29 +0200
commit8929c0a3550ae27cb5c9ed276d4c5a85594ba682 (patch)
tree56998feaa3acec13cc575a7f95b12b28e4407c44 /src/gui/painting
parentaf263b003be2f2e111ddc398bc8918cc006fcbb3 (diff)
Remove QVariant(int type, void *data, ...) constructor
It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qbrush.cpp2
-rw-r--r--src/gui/painting/qcolor.cpp2
-rw-r--r--src/gui/painting/qcolorspace.cpp2
-rw-r--r--src/gui/painting/qpen.cpp2
-rw-r--r--src/gui/painting/qpolygon.cpp4
-rw-r--r--src/gui/painting/qregion.cpp2
-rw-r--r--src/gui/painting/qtransform.cpp2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index b2f610c188..7e83e83db6 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -672,7 +672,7 @@ QBrush &QBrush::operator=(const QBrush &b)
*/
QBrush::operator QVariant() const
{
- return QVariant(QMetaType::QBrush, this);
+ return QVariant::fromValue(*this);
}
/*!
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 496d906c27..6b666435e6 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -2935,7 +2935,7 @@ bool QColor::operator!=(const QColor &color) const noexcept
*/
QColor::operator QVariant() const
{
- return QVariant(QMetaType::QColor, this);
+ return QVariant::fromValue(*this);
}
/*! \internal
diff --git a/src/gui/painting/qcolorspace.cpp b/src/gui/painting/qcolorspace.cpp
index 43efdc1166..86cb5db2ff 100644
--- a/src/gui/painting/qcolorspace.cpp
+++ b/src/gui/painting/qcolorspace.cpp
@@ -768,7 +768,7 @@ QColorTransform QColorSpace::transformationToColorSpace(const QColorSpace &color
*/
QColorSpace::operator QVariant() const
{
- return QVariant(QMetaType::QColorSpace, this);
+ return QVariant::fromValue(*this);
}
/*****************************************************************************
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 5790b74497..1c06567a32 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -408,7 +408,7 @@ QPen &QPen::operator=(const QPen &p) noexcept
*/
QPen::operator QVariant() const
{
- return QVariant(QMetaType::QPen, this);
+ return QVariant::fromValue(*this);
}
/*!
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index c053417e96..aa65fd5b99 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -716,7 +716,7 @@ QPolygon QPolygonF::toPolygon() const
*/
QPolygon::operator QVariant() const
{
- return QVariant(QMetaType::QPolygon, this);
+ return QVariant::fromValue(*this);
}
/*****************************************************************************
@@ -1040,7 +1040,7 @@ bool QPolygonF::intersects(const QPolygonF &p) const
QPolygonF::operator QVariant() const
{
- return QVariant(QMetaType::QPolygonF, this);
+ return QVariant::fromValue(*this);
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index d18629026a..7acfceee8d 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -583,7 +583,7 @@ QRegion& QRegion::operator^=(const QRegion &r)
*/
QRegion::operator QVariant() const
{
- return QVariant(QMetaType::QRegion, this);
+ return QVariant::fromValue(*this);
}
/*!
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 8f8a675fc9..bfb0e6f4ec 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -2081,7 +2081,7 @@ QTransform::TransformationType QTransform::type() const
*/
QTransform::operator QVariant() const
{
- return QVariant(QMetaType::QTransform, this);
+ return QVariant::fromValue(*this);
}