Hello community, here is the log from the commit of package qimgv for openSUSE:Leap:15.2 checked in at 2020-03-23 07:13:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/qimgv (Old) and /work/SRC/openSUSE:Leap:15.2/.qimgv.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qimgv" Mon Mar 23 07:13:44 2020 rev:12 rq:787212 version:0.8.9 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/qimgv/qimgv.changes 2020-01-15 15:55:07.231655583 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.qimgv.new.3160/qimgv.changes 2020-03-23 07:14:15.958511954 +0100 @@ -1,0 +2,256 @@ +Thu Mar 19 13:12:28 UTC 2020 - Luigi Baldoni <[email protected]> + +- Added mpv-qthelper.patch to fix build with new mpv + +------------------------------------------------------------------- +Tue Feb 11 07:05:46 UTC 2020 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.9 + What's new: + * [FolderView] You can now edit / remove files right from + folder view. + * [FolderView] Scroll animations for keyboard navigation. + * [Thumbnailer] Files are now stored as png. This fixes + transparency in folder view. + * [Panel] Scrollbar indicator. + * [Viewer] Configurable zoom step. + * [Viewer] Added another way to zoom: hold RMB and scroll. + * [Viewer] Added expandLimit option. + * Added jpeg save quality option. + * Changed some default settings. + * Updated theme & icons. + Bug fixes: + * Several bug fixes related to file operations. + * Minor visual fixes. + * Keyboard input fixes. All your keys should now work, + including symbols accessible through shift. + * Removed max zoom option. + * [windows] Do not track subfolders. + * [Thumbnailer] Fix for video files with % in file path. + * [FolderView] Thumbnails are now always uncropped. + * [FolderView] Fixes for mouse scrolling. + * Fix some keyboard focus issues. + * File format detection fixes. + * Crash fixes. + +- Refreshed qimgv-nosharedlib.patch and qimgv-PIE.patch + +- Removed group tag + +------------------------------------------------------------------- +Tue Nov 12 21:30:01 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.8 + * Quick fix for the showDirectory feature + +------------------------------------------------------------------- +Tue Nov 12 18:15:30 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.7 + What's new: + * Added volume control actions: toggleMute, volumeUp, + volumeDown + * Added mute button + * Added showDirectory action & context menu entry. Opens + current dir in the default file manager. + * Configurable text color for fullscreen info bar + * Off-screen thumbnails are now unloaded to save memory + Bug fixes: + * Fixed file format detection issues + * Fixed overlays sometimes losing keyboard focus + * Fixed moving files (regression) + * Fixed notification not being shown on file copy / move + * Fixed some temporary files not being removed on windows + * Fixed crash on indexed png with transparency + * Fixed possible crash when renaming a file + Other: + * Images are now being saved through a temporary file in case + something goes wrong + * Fixed incorrect shortcuts for frameStep / frameStepBack + (they were switched around) + +------------------------------------------------------------------- +Tue Oct 15 07:45:32 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.6 + * Dramatically improved startup speed. + * Added some missing hidpi icons + +------------------------------------------------------------------- +Tue Oct 1 07:53:33 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.5 + * Crop: change behavior to match older versions + * VideoControls: fix overlapping with panel + * FolderView: scrollbar is now easier to hit while in fullscreen + * Fix opening videos without correct mime type + +------------------------------------------------------------------- +Sun Sep 22 04:49:34 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.4 + * fix rename window (regression) + * show error when a file operation fails + +------------------------------------------------------------------- +Thu Sep 19 17:53:06 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.3 + New stuff: + * triggerScalingFilter action + * Support drag'n'dropping out of qimgv + Bug Fixes: + * Save maximized window state + * CMake fixes (VIDEO_SUPPORT option working incorrectly) + * Some unicode fixes on windows + * Fix lag during sorting mode switch + * Fix icon grid behavior when a lot of files are being + added/modified from outside + * Fix clipboard file copying (via ctrl+c) + * Load files with incorrect file extensions (when opened + directly) + +- Refreshed qimgv-nosharedlib.patch + +- Added qimgv-PIE.patch + +------------------------------------------------------------------- +Tue Aug 27 18:01:53 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.2 + * Fix new shortcuts not working when you update from 0.7.x + +------------------------------------------------------------------- +Mon Aug 26 12:45:36 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.8.1 + New stuff: + * qimgv will now track changes in the current directory. May + not work for remote locations like smb shares. + * You can now change sorting mode on-the-fly. It Just Werks. + * Add sorting mode combobox in folder view, as well as + shortcuts Shift + 1 / 2 / 3. + * You can now rename files by pressing F2. + * Added sxiv-like info bar at the bottom. + * Added info panel that shows exif tags. Press I to toggle. + * Copy current file to clipboard by pressing Ctrl+C. + * Copy current file path by pressing Ctrl+Shift+C. + * Force reload file F5. + * Context menu now can be accessed by pressing Menu key. + * You can now assign a different shortcut to context menu, it + is no longer hardcoded to right click. + * You can now assign a shortcut to toggle transparency grid + display. + * Improve folder view performance. + * Improve touchpad scrolling when using libinput driver. + * A more polished UI theme. I plan on implementing totally + configurable theme via config files, but that is for another + release. + * Split config file in two parts. The main one will not change + every time you open program. + Bug fixes: + * (important one) Fixed long startup times by moving + videoplayer into a separate library that is loaded ondemand. + I've seen some complaints about this, please give this + version a try. + * Fix some issues with mouse event handling. + * Fix scaling working incorrectly for webp files. + * Fix opening wrong directory when passed . as an argument. + * Previously when you used "Open dialog" qimgv would sometimes + hang. Now it doesn't do that. + * Saving PNG files will no longed produce huge file sizes. + Notes: + * This release may be a bit buggy as it included quite a bit + of refactoring. Stuff will get fixed promptly. + +- Added qimgv-nosharedlib.patch + +------------------------------------------------------------------- +Wed Jan 30 09:24:01 UTC 2019 - [email protected] + +- Update to version 0.7.3 + * [FolderView] Zoom support + * [FolderView] Ability to toggle filenames display + * [FolderView] Icon grid is now centered + * Re-done some of the icons, added HiDPI versions + * Startup speed optimizations + * Multiple UI related tweaks & bug fixes + * Fixed build with Qt 5.9 (regression) + +------------------------------------------------------------------- +Sat Jan 12 19:44:11 UTC 2019 - Luigi Baldoni <[email protected]> + +- Update to version 0.7.2 + * Improved HiDPI support + * APNG support (via QtApng plugin - included in windows + installer) + * Optional RAW support via QtRaw plugin + * Separate settings for fullscreen / windowed background + * UI performance improvements + * Updated some icons + * Minor startup speed optimizations + * Crop UI improvements + * Smooth scroll checkbox now works again + * Fixed some other bugs + * Added --help text + +------------------------------------------------------------------- ++++ 59 more lines (skipped) ++++ between /work/SRC/openSUSE:Leap:15.2/qimgv/qimgv.changes ++++ and /work/SRC/openSUSE:Leap:15.2/.qimgv.new.3160/qimgv.changes Old: ---- qimgv-0.6-no_return_in_nonvoid.patch qimgv-0.6-qt56.patch qimgv-0.6.tar.gz New: ---- mpv-qthelper.patch qimgv-0.8.9.tar.gz qimgv-PIE.patch qimgv-nosharedlib.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qimgv.spec ++++++ --- /var/tmp/diff_new_pack.98Y1Zf/_old 2020-03-23 07:14:16.818512471 +0100 +++ /var/tmp/diff_new_pack.98Y1Zf/_new 2020-03-23 07:14:16.818512471 +0100 @@ -1,7 +1,7 @@ # # spec file for package qimgv # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,39 +12,45 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: qimgv -Version: 0.6 +Version: 0.8.9 Release: 0 Summary: Qt5 image viewer -License: GPL-3.0 -Group: Productivity/Graphics/Viewers -Url: https://github.com/easymodo/qimgv +License: GPL-3.0-only +URL: https://github.com/easymodo/qimgv Source0: https://github.com/easymodo/qimgv/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM qimgv-0.6-qt56.patch -Patch0: qimgv-0.6-qt56.patch -# PATCH-FIX-UPSTREAM qimgv-0.6-no_return_in_nonvoid.patch -Patch1: qimgv-0.6-no_return_in_nonvoid.patch -BuildRequires: cmake +# PATCH-FEATURE-OPENSUSE qimgv-nosharedlib.patch # [email protected] build helper library statically +Patch0: qimgv-nosharedlib.patch +# PATCH-FEATURE-OPENSUSE qimgv-PIE.patch # [email protected] add PIE flags +Patch1: qimgv-PIE.patch +# PATCH-FIX-UPSTREAM mpv-qthelper.patch +Patch2: mpv-qthelper.patch +BuildRequires: cmake >= 3.13 +%if 0%{?suse_version} > 1500 BuildRequires: gcc-c++ +%else +BuildRequires: gcc8-c++ +%endif BuildRequires: hicolor-icon-theme BuildRequires: pkgconfig -BuildRequires: pkgconfig(Qt5Concurrent) -BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Concurrent) >= 5.9 +BuildRequires: pkgconfig(Qt5Widgets) >= 5.9 +BuildRequires: pkgconfig(exiv2) BuildRequires: pkgconfig(mpv) >= 1.22.0 %description Qt5 image viewer with webm support. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 %build +export CXX=g++ +test -x "$(type -p g++-8)" && export CXX=g++-8 %cmake make %{?_smp_mflags} @@ -56,6 +62,6 @@ %license LICENSE %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop -%{_datadir}/icons/hicolor/*/apps/%{name}.png +%{_datadir}/icons/hicolor/*/apps/%{name}.* %changelog ++++++ mpv-qthelper.patch ++++++ >From 935c6f35b4d0315b9c3aadcf375072998d542eb0 Mon Sep 17 00:00:00 2001 From: easymodo <[email protected]> Date: Thu, 19 Mar 2020 14:42:35 +0200 Subject: [PATCH] [mpv] include qthelper.hpp in project #184 --- qimgv_libs/qimgv_player_mpv/CMakeLists.txt | 3 +- qimgv_libs/qimgv_player_mpv/src/mpvwidget.h | 2 +- qimgv_libs/qimgv_player_mpv/src/qthelper.hpp | 386 +++++++++++++++++++ 3 files changed, 389 insertions(+), 2 deletions(-) create mode 100644 qimgv_libs/qimgv_player_mpv/src/qthelper.hpp Index: qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/CMakeLists.txt =================================================================== --- qimgv-0.8.9.orig/qimgv_libs/qimgv_player_mpv/CMakeLists.txt +++ qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/CMakeLists.txt @@ -15,7 +15,8 @@ include(GNUInstallDirs) add_library(qimgv_player_mpv STATIC src/videoplayer.cpp src/mpvwidget.cpp - src/videoplayermpv.cpp) + src/videoplayermpv.cpp + src/qthelper.hpp) target_compile_features(qimgv_player_mpv PRIVATE cxx_std_11) Index: qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/src/mpvwidget.h =================================================================== --- qimgv-0.8.9.orig/qimgv_libs/qimgv_player_mpv/src/mpvwidget.h +++ qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/src/mpvwidget.h @@ -3,7 +3,7 @@ #include <QtWidgets/QOpenGLWidget> #include <mpv/client.h> #include <mpv/opengl_cb.h> -#include <mpv/qthelper.hpp> +#include "qthelper.hpp" #include <QDebug> #include <ctime> #include <QSurfaceFormat> Index: qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/src/qthelper.hpp =================================================================== --- /dev/null +++ qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/src/qthelper.hpp @@ -0,0 +1,386 @@ +/* Copyright (C) 2017 the mpv developers + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * 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 + * knowledge that is not known or guaranteed outside of the C client API. You + * can even copy and modify this code as you like, or implement similar things + * for other languages. + */ + +#include <cstring> + +#include <QVariant> +#include <QString> +#include <QList> +#include <QHash> +#include <QSharedPointer> +#include <QMetaType> + +namespace mpv { +namespace qt { + +// Wrapper around mpv_handle. Does refcounting under the hood. +class Handle +{ + struct container { + container(mpv_handle *h) : mpv(h) {} + ~container() { mpv_terminate_destroy(mpv); } + mpv_handle *mpv; + }; + QSharedPointer<container> sptr; +public: + // Construct a new Handle from a raw mpv_handle with refcount 1. If the + // last Handle goes out of scope, the mpv_handle will be destroyed with + // mpv_terminate_destroy(). + // Never destroy the mpv_handle manually when using this wrapper. You + // will create dangling pointers. Just let the wrapper take care of + // destroying the mpv_handle. + // Never create multiple wrappers from the same raw mpv_handle; copy the + // wrapper instead (that's what it's for). + static Handle FromRawHandle(mpv_handle *handle) { + Handle h; + h.sptr = QSharedPointer<container>(new container(handle)); + return h; + } + + // Return the raw handle; for use with the libmpv C API. + operator mpv_handle*() const { return sptr ? (*sptr).mpv : 0; } +}; + +static inline QVariant node_to_variant(const mpv_node *node) +{ + switch (node->format) { + case MPV_FORMAT_STRING: + return QVariant(QString::fromUtf8(node->u.string)); + case MPV_FORMAT_FLAG: + return QVariant(static_cast<bool>(node->u.flag)); + case MPV_FORMAT_INT64: + return QVariant(static_cast<qlonglong>(node->u.int64)); + case MPV_FORMAT_DOUBLE: + return QVariant(node->u.double_); + case MPV_FORMAT_NODE_ARRAY: { + mpv_node_list *list = node->u.list; + QVariantList qlist; + for (int n = 0; n < list->num; n++) + qlist.append(node_to_variant(&list->values[n])); + return QVariant(qlist); + } + case MPV_FORMAT_NODE_MAP: { + mpv_node_list *list = node->u.list; + QVariantMap qmap; + for (int n = 0; n < list->num; n++) { + qmap.insert(QString::fromUtf8(list->keys[n]), + node_to_variant(&list->values[n])); + } + return QVariant(qmap); + } + default: // MPV_FORMAT_NONE, unknown values (e.g. future extensions) + return QVariant(); + } +} + +struct node_builder { + node_builder(const QVariant& v) { + set(&node_, v); + } + ~node_builder() { + free_node(&node_); + } + mpv_node *node() { return &node_; } +private: + Q_DISABLE_COPY(node_builder) + mpv_node node_; + mpv_node_list *create_list(mpv_node *dst, bool is_map, int num) { + dst->format = is_map ? MPV_FORMAT_NODE_MAP : MPV_FORMAT_NODE_ARRAY; + mpv_node_list *list = new mpv_node_list(); + dst->u.list = list; + if (!list) + goto err; + list->values = new mpv_node[num](); + if (!list->values) + goto err; + if (is_map) { + list->keys = new char*[num](); + if (!list->keys) + goto err; + } + return list; + err: + free_node(dst); + return NULL; + } + char *dup_qstring(const QString &s) { + QByteArray b = s.toUtf8(); + char *r = new char[b.size() + 1]; + if (r) + std::memcpy(r, b.data(), b.size() + 1); + return r; + } + bool test_type(const QVariant &v, QMetaType::Type t) { + // The Qt docs say: "Although this function is declared as returning + // "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); + } + void set(mpv_node *dst, const QVariant &src) { + if (test_type(src, QMetaType::QString)) { + dst->format = MPV_FORMAT_STRING; + dst->u.string = dup_qstring(src.toString()); + if (!dst->u.string) + goto fail; + } else if (test_type(src, QMetaType::Bool)) { + dst->format = MPV_FORMAT_FLAG; + dst->u.flag = src.toBool() ? 1 : 0; + } else if (test_type(src, QMetaType::Int) || + test_type(src, QMetaType::LongLong) || + test_type(src, QMetaType::UInt) || + test_type(src, QMetaType::ULongLong)) + { + dst->format = MPV_FORMAT_INT64; + dst->u.int64 = src.toLongLong(); + } else if (test_type(src, QMetaType::Double)) { + dst->format = MPV_FORMAT_DOUBLE; + dst->u.double_ = src.toDouble(); + } else if (src.canConvert<QVariantList>()) { + QVariantList qlist = src.toList(); + mpv_node_list *list = create_list(dst, false, qlist.size()); + if (!list) + goto fail; + list->num = qlist.size(); + for (int n = 0; n < qlist.size(); n++) + set(&list->values[n], qlist[n]); + } else if (src.canConvert<QVariantMap>()) { + QVariantMap qmap = src.toMap(); + mpv_node_list *list = create_list(dst, true, qmap.size()); + if (!list) + goto fail; + list->num = qmap.size(); + for (int n = 0; n < qmap.size(); n++) { + list->keys[n] = dup_qstring(qmap.keys()[n]); + if (!list->keys[n]) { + free_node(dst); + goto fail; + } + set(&list->values[n], qmap.values()[n]); + } + } else { + goto fail; + } + return; + fail: + dst->format = MPV_FORMAT_NONE; + } + void free_node(mpv_node *dst) { + switch (dst->format) { + case MPV_FORMAT_STRING: + delete[] dst->u.string; + break; + case MPV_FORMAT_NODE_ARRAY: + case MPV_FORMAT_NODE_MAP: { + mpv_node_list *list = dst->u.list; + if (list) { + for (int n = 0; n < list->num; n++) { + if (list->keys) + delete[] list->keys[n]; + if (list->values) + free_node(&list->values[n]); + } + delete[] list->keys; + delete[] list->values; + } + delete list; + break; + } + default: ; + } + dst->format = MPV_FORMAT_NONE; + } +}; + +/** + * RAII wrapper that calls mpv_free_node_contents() on the pointer. + */ +struct node_autofree { + mpv_node *ptr; + node_autofree(mpv_node *a_ptr) : ptr(a_ptr) {} + ~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. + * + * You can use get_error() or is_error() to extract the error status from a + * QVariant value. + */ +struct ErrorReturn +{ + /** + * enum mpv_error value (or a value outside of it if ABI was extended) + */ + int error; + + ErrorReturn() : error(0) {} + explicit ErrorReturn(int err) : error(err) {} +}; + +/** + * Return the mpv error code packed into a QVariant, or 0 (success) if it's not + * an error value. + * + * @return error code (<0) or success (>=0) + */ +static inline int get_error(const QVariant &v) +{ + if (!v.canConvert<ErrorReturn>()) + return 0; + return v.value<ErrorReturn>().error; +} + +/** + * Return whether the QVariant carries a mpv error code. + */ +static inline bool is_error(const QVariant &v) +{ + return get_error(v) < 0; +} + +/** + * Return the given property as mpv_node converted to QVariant, or QVariant() + * on error. + * + * @param name the property name + * @return the property value, or an ErrorReturn with the error code + */ +static inline QVariant get_property(mpv_handle *ctx, const QString &name) +{ + mpv_node node; + int err = mpv_get_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, &node); + if (err < 0) + return QVariant::fromValue(ErrorReturn(err)); + node_autofree f(&node); + return node_to_variant(&node); +} + +/** + * Set the given property as mpv_node converted from the QVariant argument. + * + * @return mpv error code (<0 on error, >= 0 on success) + */ +static inline int set_property(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()); +} + +/** + * mpv_command_node() equivalent. + * + * @param args command arguments, with args[0] being the command name as string + * @return the property value, or an ErrorReturn with the error code + */ +static inline QVariant command(mpv_handle *ctx, const QVariant &args) +{ + node_builder node(args); + mpv_node res; + int err = mpv_command_node(ctx, node.node(), &res); + if (err < 0) + return QVariant::fromValue(ErrorReturn(err)); + node_autofree f(&res); + return node_to_variant(&res); +} + +} +} + +Q_DECLARE_METATYPE(mpv::qt::ErrorReturn) + +#endif /* else #if MPV_ENABLE_DEPRECATED */ + +#endif ++++++ qimgv-0.6.tar.gz -> qimgv-0.8.9.tar.gz ++++++ ++++ 47447 lines of diff (skipped) ++++++ qimgv-PIE.patch ++++++ Index: qimgv-0.8.9/qimgv/CMakeLists.txt =================================================================== --- qimgv-0.8.9.orig/qimgv/CMakeLists.txt +++ qimgv-0.8.9/qimgv/CMakeLists.txt @@ -21,6 +21,9 @@ add_subdirectory(utils) target_compile_features(qimgv PRIVATE cxx_std_17) set_target_properties(qimgv PROPERTIES CXX_EXTENSIONS OFF) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") +set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + # LINK STUFF target_link_libraries(qimgv PRIVATE Qt5::Core Qt5::Widgets Qt5::Concurrent) if(USING_LIBSTDCXX) ++++++ qimgv-nosharedlib.patch ++++++ Index: qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/CMakeLists.txt =================================================================== --- qimgv-0.8.9.orig/qimgv_libs/qimgv_player_mpv/CMakeLists.txt +++ qimgv-0.8.9/qimgv_libs/qimgv_player_mpv/CMakeLists.txt @@ -12,7 +12,7 @@ pkg_check_modules(Mpv REQUIRED IMPORTED_ include(GNUInstallDirs) -add_library(qimgv_player_mpv SHARED +add_library(qimgv_player_mpv STATIC src/videoplayer.cpp src/mpvwidget.cpp src/videoplayermpv.cpp) @@ -38,4 +38,3 @@ endif() target_compile_definitions(qimgv_player_mpv PRIVATE QIMGV_PLAYER_MPV_LIBRARY) -install(TARGETS qimgv_player_mpv)
