Quote:
Originally Posted by kovidgoyal
The Qt version hasn't changed between 0.6.55 and 0.7.x. What has changed (I think) is that earlier calibre was not using QUrl.fromLocalFile it was directly passing a filename to QDesktopServices. While this used to work for UNC paths, it broke in several other more common cases, so I switched it to QUrl.fromLocalFile
|
Yes, I figured that out too. I even downloaded serveral older version to see which one would allow me to use UNC paths. I had to go back quite far, sofar as that version is using QT 4.5.2. I downloaded the sources of QT 4.6 and 4.5 and compared QDesktopServices to see what changed. They changed another subroutine and think that must be the problem, not you changing your source although I think I'll see what you changed and if it can be changed back without side effects.
Quote:
You can test by doing
Code:
calibre-debug -c "from PyQt4.Qt import *; app = QApplication([]); f = r'\\server\whatever'; url = QUrl.fromLocalFile(f); QDesptopServices.open(url)"
|
Thanks for the example with typos

Adding a print statement to see what url looked like didn't give me any clues yet (file://mcc-srv/apps/e.pdf). According to Wikipedia its a valid URI scheme (RFC1738)
Testing a bit further I might decide to recompile QT 4.6.3 with some debugging print statements added to qdesktopservices_win.cpp to see what it makes of the file://server/file.pdf since I have a feeling that things go very wrong there.
Atleast the version of 4.5.2 does something more sensible to my eyes.
Regards,
Joop