From c89f675e126ab662a79e296137c3fc5da67b0cb1 Mon Sep 17 00:00:00 2001 From: APTX Date: Sat, 19 Feb 2022 18:40:49 +0900 Subject: [PATCH] Remove deprecated code from qthelper.hpp --- backendplugins/backend_mpv/qthelper.hpp | 61 ------------------------- 1 file changed, 61 deletions(-) diff --git a/backendplugins/backend_mpv/qthelper.hpp b/backendplugins/backend_mpv/qthelper.hpp index 0f66490..5ea7885 100644 --- a/backendplugins/backend_mpv/qthelper.hpp +++ b/backendplugins/backend_mpv/qthelper.hpp @@ -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. -- 2.52.0