14 pyqtSignal, QObject, QUrl, QFile, QDir, QIODevice, QUrlQuery |
14 pyqtSignal, QObject, QUrl, QFile, QDir, QIODevice, QUrlQuery |
15 ) |
15 ) |
16 from PyQt6.QtWidgets import QLineEdit, QInputDialog |
16 from PyQt6.QtWidgets import QLineEdit, QInputDialog |
17 from PyQt6.QtNetwork import QNetworkRequest, QNetworkReply |
17 from PyQt6.QtNetwork import QNetworkRequest, QNetworkReply |
18 |
18 |
19 from E5Gui.E5Application import e5App |
19 from E5Gui.EricApplication import ericApp |
20 from E5Gui import E5MessageBox |
20 from E5Gui import EricMessageBox |
21 |
21 |
22 from Utilities.AutoSaver import AutoSaver |
22 from Utilities.AutoSaver import AutoSaver |
23 import Utilities |
23 import Utilities |
24 import Preferences |
24 import Preferences |
25 |
25 |
242 method = res["method"] |
242 method = res["method"] |
243 actionUrl = QUrl(res["action"]) |
243 actionUrl = QUrl(res["action"]) |
244 inputName = res["inputName"] |
244 inputName = res["inputName"] |
245 |
245 |
246 if method != "get": |
246 if method != "get": |
247 E5MessageBox.warning( |
247 EricMessageBox.warning( |
248 self, |
248 self, |
249 self.tr("Method not supported"), |
249 self.tr("Method not supported"), |
250 self.tr( |
250 self.tr( |
251 """{0} method is not supported.""").format(method.upper())) |
251 """{0} method is not supported.""").format(method.upper())) |
252 return |
252 return |
459 if engine is None or not engine.isValid(): |
459 if engine is None or not engine.isValid(): |
460 return False |
460 return False |
461 |
461 |
462 host = QUrl(engine.searchUrlTemplate()).host() |
462 host = QUrl(engine.searchUrlTemplate()).host() |
463 |
463 |
464 res = E5MessageBox.yesNo( |
464 res = EricMessageBox.yesNo( |
465 None, |
465 None, |
466 "", |
466 "", |
467 self.tr( |
467 self.tr( |
468 """<p>Do you want to add the following engine to your""" |
468 """<p>Do you want to add the following engine to your""" |
469 """ list of search engines?<br/><br/>Name: {0}<br/>""" |
469 """ list of search engines?<br/><br/>Name: {0}<br/>""" |