]> Some of my projects - aniplayer.git/commitdiff
Remove deprecated code from qthelper.hpp
authorAPTX <marek321@gmail.com>
Sat, 19 Feb 2022 09:40:49 +0000 (18:40 +0900)
committerAPTX <marek321@gmail.com>
Mon, 21 Feb 2022 15:10:20 +0000 (00:10 +0900)
backendplugins/backend_mpv/qthelper.hpp

index 0f664906022b3182c3f16bfb87e3067d03e54fa7..5ea788540c6bb7d89dd83ec8d6340d1a5bd58c80 100644 (file)
@@ -226,67 +226,6 @@ struct node_autofree {
     ~node_autofree() { mpv_free_node_contents(ptr); }
 };
 
-#if MPV_ENABLE_DEPRECATED
-
-/**
- * Return the given property as mpv_node converted to QVariant, or QVariant()
- * on error.
- *
- * @deprecated use get_property() instead
- *
- * @param name the property name
- */
-static inline QVariant get_property_variant(mpv_handle *ctx, const QString &name)
-{
-    mpv_node node;
-    if (mpv_get_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, &node) < 0)
-        return QVariant();
-    node_autofree f(&node);
-    return node_to_variant(&node);
-}
-
-/**
- * Set the given property as mpv_node converted from the QVariant argument.
-
- * @deprecated use set_property() instead
- */
-static inline int set_property_variant(mpv_handle *ctx, const QString &name,
-                                       const QVariant &v)
-{
-    node_builder node(v);
-    return mpv_set_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, node.node());
-}
-
-/**
- * Set the given option as mpv_node converted from the QVariant argument.
- *
- * @deprecated use set_property() instead
- */
-static inline int set_option_variant(mpv_handle *ctx, const QString &name,
-                                     const QVariant &v)
-{
-    node_builder node(v);
-    return mpv_set_option(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, node.node());
-}
-
-/**
- * mpv_command_node() equivalent. Returns QVariant() on error (and
- * unfortunately, the same on success).
- *
- * @deprecated use command() instead
- */
-static inline QVariant command_variant(mpv_handle *ctx, const QVariant &args)
-{
-    node_builder node(args);
-    mpv_node res;
-    if (mpv_command_node(ctx, node.node(), &res) < 0)
-        return QVariant();
-    node_autofree f(&res);
-    return node_to_variant(&res);
-}
-
-#endif
-
 /**
  * This is used to return error codes wrapped in QVariant for functions which
  * return QVariant.