134 # For some reason the url to load maybe wrong (passed from web engine) |
134 # For some reason the url to load maybe wrong (passed from web engine) |
135 # though the css file and the references inside should work that way. |
135 # though the css file and the references inside should work that way. |
136 # One possible problem might be that the css is loaded at the same |
136 # One possible problem might be that the css is loaded at the same |
137 # level as the html, thus a path inside the css like |
137 # level as the html, thus a path inside the css like |
138 # (../images/foo.png) might cd out of the virtual folder |
138 # (../images/foo.png) might cd out of the virtual folder |
139 if not self.__engine.findFile(url).isValid(): |
139 if ( |
140 if strUrl.startswith(QtDocPath): |
140 not self.__engine.findFile(url).isValid() and |
141 newUrl = self.__job.requestUrl() |
141 strUrl.startswith(QtDocPath) |
142 if not newUrl.path().startswith("/qdoc/"): |
142 ): |
143 newUrl.setPath("/qdoc" + newUrl.path()) |
143 newUrl = self.__job.requestUrl() |
144 url = newUrl |
144 if not newUrl.path().startswith("/qdoc/"): |
145 strUrl = url.toString() |
145 newUrl.setPath("/qdoc" + newUrl.path()) |
|
146 url = newUrl |
|
147 strUrl = url.toString() |
146 |
148 |
147 self.__mimeType = mimetypes.guess_type(strUrl)[0] |
149 self.__mimeType = mimetypes.guess_type(strUrl)[0] |
148 if self.__mimeType is None: |
150 if self.__mimeType is None: |
149 # do our own (limited) guessing |
151 # do our own (limited) guessing |
150 self.__mimeType = self.__mimeFromUrl(url) |
152 self.__mimeType = self.__mimeFromUrl(url) |