247 idx = self.currentIndex() |
247 idx = self.currentIndex() |
248 if idx < 0 or idx > self.count(): |
248 if idx < 0 or idx > self.count(): |
249 return |
249 return |
250 |
250 |
251 req = QNetworkRequest(self.widget(idx).url()) |
251 req = QNetworkRequest(self.widget(idx).url()) |
252 req.setRawHeader("X-Eric6-UserLoadAction", b"1") |
252 req.setRawHeader(b"X-Eric6-UserLoadAction", b"1") |
253 self.newBrowser(None, (req, QNetworkAccessManager.GetOperation, b"")) |
253 self.newBrowser(None, (req, QNetworkAccessManager.GetOperation, b"")) |
254 |
254 |
255 def __tabContextMenuClose(self): |
255 def __tabContextMenuClose(self): |
256 """ |
256 """ |
257 Private method to close the selected tab. |
257 Private method to close the selected tab. |
855 Private slot to handle the entering of an URL. |
855 Private slot to handle the entering of an URL. |
856 """ |
856 """ |
857 edit = self.sender() |
857 edit = self.sender() |
858 url = self.__guessUrlFromPath(edit.text()) |
858 url = self.__guessUrlFromPath(edit.text()) |
859 request = QNetworkRequest(url) |
859 request = QNetworkRequest(url) |
860 request.setRawHeader("X-Eric6-UserLoadAction", b"1") |
860 request.setRawHeader(b"X-Eric6-UserLoadAction", b"1") |
861 if e5App().keyboardModifiers() == Qt.AltModifier: |
861 if e5App().keyboardModifiers() == Qt.AltModifier: |
862 self.newBrowser( |
862 self.newBrowser( |
863 None, (request, QNetworkAccessManager.GetOperation, b"")) |
863 None, (request, QNetworkAccessManager.GetOperation, b"")) |
864 else: |
864 else: |
865 self.currentBrowser().setSource( |
865 self.currentBrowser().setSource( |
903 if url.scheme() != "" and \ |
903 if url.scheme() != "" and \ |
904 (url.host() != "" or url.path() != ""): |
904 (url.host() != "" or url.path() != ""): |
905 return url |
905 return url |
906 |
906 |
907 urlString = Preferences.getHelp("DefaultScheme") + path.strip() |
907 urlString = Preferences.getHelp("DefaultScheme") + path.strip() |
908 url = QUrl.fromEncoded(urlString.encode(), QUrl.TolerantMode) |
908 url = QUrl.fromEncoded(urlString.encode("utf-8"), QUrl.TolerantMode) |
909 |
909 |
910 return url |
910 return url |
911 |
911 |
912 def __currentChanged(self, index): |
912 def __currentChanged(self, index): |
913 """ |
913 """ |