summaryrefslogtreecommitdiffstats
path: root/examples/script/context2d/context2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/script/context2d/context2d.cpp')
-rw-r--r--examples/script/context2d/context2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/script/context2d/context2d.cpp b/examples/script/context2d/context2d.cpp
index c408736..49fc3bc 100644
--- a/examples/script/context2d/context2d.cpp
+++ b/examples/script/context2d/context2d.cpp
@@ -278,7 +278,7 @@ QVariant Context2D::strokeStyle() const
void Context2D::setStrokeStyle(const QVariant &style)
{
- if (qVariantCanConvert<CanvasGradient>(style)) {
+ if (style.canConvert<CanvasGradient>()) {
CanvasGradient cg = qvariant_cast<CanvasGradient>(style);
m_state.strokeStyle = cg.value;
} else {
@@ -296,7 +296,7 @@ QVariant Context2D::fillStyle() const
//! [3]
void Context2D::setFillStyle(const QVariant &style)
{
- if (qVariantCanConvert<CanvasGradient>(style)) {
+ if (style.canConvert<CanvasGradient>()) {
CanvasGradient cg = qvariant_cast<CanvasGradient>(style);
m_state.fillStyle = cg.value;
} else {