summaryrefslogtreecommitdiffstats
path: root/libmpv/qthelper.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libmpv/qthelper.hpp')
-rw-r--r--libmpv/qthelper.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/libmpv/qthelper.hpp b/libmpv/qthelper.hpp
index bc30dec8a5..3af86e36e7 100644
--- a/libmpv/qthelper.hpp
+++ b/libmpv/qthelper.hpp
@@ -13,6 +13,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef MPV_CLIENT_API_QTHELPER_H_
+#define MPV_CLIENT_API_QTHELPER_H_
+
+#include <mpv/client.h>
+
+#if !MPV_ENABLE_DEPRECATED
+#error "This helper is deprecated. Copy it into your project instead."
+#else
+
/**
* Note: these helpers are provided for convenience for C++/Qt applications.
* This is based on the public API in client.h, and it does not encode any
@@ -21,9 +30,6 @@
* for other languages.
*/
-#ifndef MPV_CLIENT_API_QTHELPER_H_
-#define MPV_CLIENT_API_QTHELPER_H_
-
#include <cstring>
#include <QVariant>
@@ -33,8 +39,6 @@
#include <QSharedPointer>
#include <QMetaType>
-#include <mpv/client.h>
-
namespace mpv {
namespace qt {
@@ -377,4 +381,6 @@ static inline QVariant command(mpv_handle *ctx, const QVariant &args)
Q_DECLARE_METATYPE(mpv::qt::ErrorReturn)
+#endif /* else #if MPV_ENABLE_DEPRECATED */
+
#endif