YUView
YUView copied to clipboard
Fixed autosaving of playlist not working on linux
I actually never used the autosave feature so far. but now that i'm looking into #353 I realized it doesn't work for me at all in the current version. The reason is that on Linux absolute paths are saved as "file:///xxx" for path "/xxx". QUrl does this. When reading QString was used and no conversion to the latter (required) representation occurred. Fixed by letting QUrl do the conversion. Strangely it only affects the autosave feature. Playlists stored to files worked before. It was still able to find the files using the relative paths. Why do we actually need QUrl for storing paths in the first place? I guess YUView can also load web links? The change needs to be tested again on Windows and Mac, which I can't do. I suspect the bug was also present on Mac before.
Nice thank you for catching this. I will:
- Check why are we using QUrl (I think it was to get the relative path?!? )
- Test the fix on Windows / Ubuntu
Aah I think now I understand the issue. I also debugged the code a bit on Windows and the QUrl code you added does not work on windows.
@nolyn I removed all the QUrl stuff and am just using the QDir::absolut and relative path functions. Can you double check if this works for the bug that you discovered? For me YUView is now able to get the aboslute file path for all files on windows and mac.