diff --git a/lektord/c/qthelper.hh b/lektord/c/qthelper.hh
index d81e41f26c32c455cb455ad5c133850a0c735243..26b0dd0196366b22e780b58031ad9d6d1f169eff 100644
--- a/lektord/c/qthelper.hh
+++ b/lektord/c/qthelper.hh
@@ -92,7 +92,7 @@ private:
         // "QVariant::Type(obsolete), the return value should be interpreted
         // as QMetaType::Type."
         // So a cast really seems to be needed to avoid warnings (urgh).
-        return static_cast<int>(v.type()) == static_cast<int>(t);
+        return static_cast<int>(v.typeId()) == static_cast<int>(t);
     }
 
     void set(mpv_node *dst, const QVariant &src)