Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.1
-
None
-
Archlinux
Description
Sometimes opening files does not work with QDesktopServices.
In my code I do this
qDebug() << QUrl::fromLocalFile(file_->filePath()).toString(); QDesktopServices::openUrl(QUrl::fromLocalFile(file_->filePath()));
It it prints
[16:30:39] [DEBG] "file:///home/manuel/Dropbox/TODO.md"
strace says
[pid 19725] execve("/usr/bin/xdg-open", ["/usr/bin/xdg-open", "file:Dropbox/TODO.md"], 0x557e8afe1330 /* 50 vars */ <unfinished ...>
Well and when I excute this myself in the shell:
manuel@argon ~ $ /usr/bin/xdg-open file:Dropbox/TODO.md gio: file:Dropbox/TODO.md: Vorgang wird nicht unterstützt
I know gio should be capable of handling relative urls, but also Qt should not change the URL if I pass it an absolute path.
The funny thing is that when I start open this file with my program running in QtCreator it mysteriously works.