Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
0caa9ea0 by Prince Gupta at 2022-05-21T14:41:02+00:00
qt: fix cover generation on windows
in previous code, for path "C:/image.jpg", the url scheme will be
"C" and
the call to QQmlFile::urlToLocalFileorQrc with fail since url scheme is not
"file"
but the provided input path is valid file path, fix such cases
- - - - -
1 changed file:
- modules/gui/qt/util/covergenerator.cpp
Changes:
=====================================
modules/gui/qt/util/covergenerator.cpp
=====================================
@@ -272,8 +272,8 @@ void CoverGenerator::drawImage(QPainter & painter, const
QString & fileName, con
{
//QFile expect the :/ instead of qrc:// for resources files
const QUrl fileURL {fileName};
- const QString adaptedFilename = fileURL.scheme().isEmpty() ? fileName :
QQmlFile::urlToLocalFileOrQrc(fileURL);
- QFile file(adaptedFilename);
+ const QString adaptedFilename = QQmlFile::urlToLocalFileOrQrc(fileURL);
+ QFile file(adaptedFilename.isEmpty() ? fileName : adaptedFilename);
if (file.open(QIODevice::ReadOnly) == false)
{
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/0caa9ea0e6abd897a059a60ba43f66d2bd1deba1
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/0caa9ea0e6abd897a059a60ba43f66d2bd1deba1
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits