eric6/WebBrowser/SafeBrowsing/SafeBrowsingDialog.py

changeset 7269
0c63ea7f94bd
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7268:a28338eaf694 7269:0c63ea7f94bd
7 Module implementing a dialog to configure safe browsing support. 7 Module implementing a dialog to configure safe browsing support.
8 """ 8 """
9 9
10 10
11 from PyQt5.QtCore import pyqtSlot, Qt, QUrl, QDateTime 11 from PyQt5.QtCore import pyqtSlot, Qt, QUrl, QDateTime
12 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton, \ 12 from PyQt5.QtWidgets import (
13 QApplication 13 QDialog, QDialogButtonBox, QAbstractButton, QApplication
14 )
14 15
15 from E5Gui import E5MessageBox 16 from E5Gui import E5MessageBox
16 17
17 from .Ui_SafeBrowsingDialog import Ui_SafeBrowsingDialog 18 from .Ui_SafeBrowsingDialog import Ui_SafeBrowsingDialog
18 19
332 """ 333 """
333 Private slot to show the time of the next automatic threat list update. 334 Private slot to show the time of the next automatic threat list update.
334 """ 335 """
335 nextUpdateDateTime = Preferences.getWebBrowser( 336 nextUpdateDateTime = Preferences.getWebBrowser(
336 "SafeBrowsingUpdateDateTime") 337 "SafeBrowsingUpdateDateTime")
337 if not nextUpdateDateTime.isValid() or \ 338 if (
338 nextUpdateDateTime <= QDateTime.currentDateTime(): 339 not nextUpdateDateTime.isValid() or
340 nextUpdateDateTime <= QDateTime.currentDateTime()
341 ):
339 message = self.tr("The next automatic threat list update will be" 342 message = self.tr("The next automatic threat list update will be"
340 " done now.") 343 " done now.")
341 else: 344 else:
342 message = self.tr("<p>The next automatic threat list update will" 345 message = self.tr("<p>The next automatic threat list update will"
343 " be done at <b>{0}</b>.</p>").format( 346 " be done at <b>{0}</b>.</p>").format(

eric ide

mercurial