--- a/WebBrowser/WebBrowserPage.py Wed Mar 16 19:51:00 2016 +0100 +++ b/WebBrowser/WebBrowserPage.py Wed Mar 16 19:55:09 2016 +0100 @@ -47,77 +47,6 @@ except ImportError: SSL_AVAILABLE = False -# TODO: ExternalJsObject: move this to the object -############################################################################### -## -## -##class JavaScriptEricObject(QObject): -## """ -## Class implementing an external javascript object to search via the -## startpage. -## """ -## # these must be in line with the strings used by the javascript part of -## # the start page -## translations = [ -## QT_TRANSLATE_NOOP("JavaScriptEricObject", -## "Welcome to eric6 Web Browser!"), -## QT_TRANSLATE_NOOP("JavaScriptEricObject", "eric6 Web Browser"), -## QT_TRANSLATE_NOOP("JavaScriptEricObject", "Search!"), -## QT_TRANSLATE_NOOP("JavaScriptEricObject", "About eric6"), -## ] -## -## def __init__(self, mw, parent=None): -## """ -## Constructor -## -## @param mw reference to the main window 8HelpWindow) -## @param parent reference to the parent object (QObject) -## """ -## super(JavaScriptEricObject, self).__init__(parent) -## -## self.__mw = mw -## -## @pyqtSlot(str, result=str) -## def translate(self, trans): -## """ -## Public method to translate the given string. -## -## @param trans string to be translated (string) -## @return translation (string) -## """ -## if trans == "QT_LAYOUT_DIRECTION": -## # special handling to detect layout direction -## if qApp.isLeftToRight(): -## return "LTR" -## else: -## return "RTL" -## -## return self.tr(trans) -## -## @pyqtSlot(result=str) -## def providerString(self): -## """ -## Public method to get a string for the search provider. -## -## @return string for the search provider (string) -## """ -## return self.tr("Search results provided by {0}")\ -## .format(self.__mw.openSearchManager().currentEngineName()) -## -## @pyqtSlot(str, result=str) -## def searchUrl(self, searchStr): -## """ -## Public method to get the search URL for the given search term. -## -## @param searchStr search term (string) -## @return search URL (string) -## """ -## return bytes( -## self.__mw.openSearchManager().currentEngine() -## .searchUrl(searchStr).toEncoded()).decode() -## -############################################################################### - class WebBrowserPage(QWebEnginePage): """