417 if channel is None: |
417 if channel is None: |
418 channel = QWebChannel(self) |
418 channel = QWebChannel(self) |
419 ExternalJsObject.setupWebChannel(channel, self) |
419 ExternalJsObject.setupWebChannel(channel, self) |
420 |
420 |
421 worldId = -1 |
421 worldId = -1 |
422 if url.scheme() in ("eric", "qthelp"): |
422 worldId = ( |
423 worldId = self.UnsafeJsWorld |
423 self.UnsafeJsWorld |
424 else: |
424 if url.scheme() in ("eric", "qthelp") else |
425 worldId = self.SafeJsWorld |
425 self.SafeJsWorld |
|
426 ) |
426 if worldId != self.__channelWorldId: |
427 if worldId != self.__channelWorldId: |
427 self.__channelWorldId = worldId |
428 self.__channelWorldId = worldId |
428 try: |
429 try: |
429 self.setWebChannel(channel, self.__channelWorldId) |
430 self.setWebChannel(channel, self.__channelWorldId) |
430 except TypeError: |
431 except TypeError: |