https://bugs.kde.org/show_bug.cgi?id=463748

--- Comment #2 from Mike Jonkmans <k...@jonkmans.nl> ---
(In reply to Urs Fleisch from comment #1)
> Thanks for the report.
Thanks for the swift response and the great software :)

> I analyzed the case using gdb and found out that the
> problem starts when QFileInfo is used:
> 
> kid3application.cpp:
> 839       for (const QString& path : pathList) {
> 840         if (!path.isEmpty()) {
> 841           QFileInfo fileInfo(path);
> 842           if (fileCheck && !fileInfo.exists()) {
> 
> fileInfo.exists() will return false if path starts with a colon. See
> https://doc.qt.io/qt-6/qfileinfo.html for the explanation:
> 
> > Note: Paths starting with a colon (:) are always considered absolute, as 
> > they denote a QResource.

I see, reading further, the exact 'problem' is described here:
https://doc.qt.io/qt-6/resources.html#runtime-api

It would have been nice if somehow the QFileInfo.exists() method could be told
to skip the resource indicators.
For instance via a flag to the exists method or via the QFileInfo constructor.
But that is out of scope here.

> You can use the following workaround: Use "./:a.mp4" instead of ":a.mp4" (or
> use the absolute path to the file).

This is a nice workaround. 
Better than what I did (link the file to a fixed name).

--
Regards, Mike

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to