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( |