diff --git a/modules/gui/qt/util/vlcaccess_image_provider.cpp b/modules/gui/qt/util/vlcaccess_image_provider.cpp index 2c77470131117d228a9a882264c2cb043d45c2cb..673661e6b13db6ce910a4196bda1a42a034cf593 100644 --- a/modules/gui/qt/util/vlcaccess_image_provider.cpp +++ b/modules/gui/qt/util/vlcaccess_image_provider.cpp @@ -188,8 +188,14 @@ VLCAccessImage::VLCAccessImage(QObject* parent) : QObject(parent) {} -QString VLCAccessImage::uri(QString path) +QString VLCAccessImage::uri(const QString& path, const bool excludeLocalFileOrUnknownScheme) { + if (excludeLocalFileOrUnknownScheme) + { + const QUrl url(path); + if (url.scheme().isEmpty() || url.scheme() == QLatin1String("qrc") || url.scheme() == QLatin1String("file")) + return path; + } return VLCAccessImageProvider::wrapUri(path); } diff --git a/modules/gui/qt/util/vlcaccess_image_provider.hpp b/modules/gui/qt/util/vlcaccess_image_provider.hpp index fbfc128e575d60d3b18873713135e7d2d089b0bc..b7fa81968b50e2d4021cf95274bef0311169de4d 100644 --- a/modules/gui/qt/util/vlcaccess_image_provider.hpp +++ b/modules/gui/qt/util/vlcaccess_image_provider.hpp @@ -97,7 +97,7 @@ public: * @code * */ - Q_INVOKABLE QString uri(QString path); + Q_INVOKABLE QString uri(const QString& path, bool excludeLocalFileOrUnknownScheme = true); };