Details
-
Bug
-
Status: Closed
-
P4: Low
-
Resolution: Cannot Reproduce
-
5.4.1
-
None
-
None
Description
Clarification of original bug QTBUG-44890
As noted in the discussion, QUrl::fromLocalFile() or QUrl::QUrl() do not appear to handle relative file paths... or file in current directory. Examples:
QUrl::fromLocalFile("overview.html"); // does not load QUrl::fromLocalFile("./overview.html"); // does not load (but does not segfault) url=QUrl("file://overview.html"); // does not load url=QUrl("overview.html"); // does not load url=QUrl("file:///home/dave/qt5/qtwebkit-examples/examples/webkitwidgets/fancybrowser/overview.html"); // works
Testing in another environment (SUSE 13.1) running Qt4.8.5, the behaviour is slightly different. This works:
url=QUrl("overview.html"); // works url=QUrl("./overview.html"); // works
So something seems broken between Qt4 and Qt5.
If relative URL is not supported, that is fine, but documentation should reflect this limitation.
This can be easily produced using fancybrowser example, main.cpp line 75.