10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 import types |
13 import types |
14 |
14 |
15 from PyQt5.QtCore import QMetaObject, pyqtSignal, Qt, QRect, pyqtSlot |
15 from PyQt5.QtCore import QMetaObject, pyqtSignal, Qt, QRect, pyqtSlot, \ |
|
16 qVersion |
16 from PyQt5.QtGui import QPixmap |
17 from PyQt5.QtGui import QPixmap |
17 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \ |
18 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \ |
18 QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \ |
19 QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \ |
19 QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel |
20 QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel |
20 |
21 |
337 "HelpFlashCookieManagerPage", "0webBrowserPage", None], |
338 "HelpFlashCookieManagerPage", "0webBrowserPage", None], |
338 "helpVirusTotalPage": |
339 "helpVirusTotalPage": |
339 [self.tr("VirusTotal Interface"), "virustotal.png", |
340 [self.tr("VirusTotal Interface"), "virustotal.png", |
340 "HelpVirusTotalPage", "0webBrowserPage", None], |
341 "HelpVirusTotalPage", "0webBrowserPage", None], |
341 }) |
342 }) |
|
343 if qVersion() >= "5.8.0": |
|
344 self.configItems.update({ |
|
345 "webBrowserSpellCheckingPage": |
|
346 [self.tr("Spell checking"), |
|
347 "preferences-spellchecking.png", |
|
348 "WebBrowserSpellCheckingPage", "0webBrowserPage", |
|
349 None], |
|
350 }) |
342 else: |
351 else: |
343 try: |
352 try: |
344 from PyQt5 import QtWebKit # __IGNORE_WARNING__ |
353 from PyQt5 import QtWebKit # __IGNORE_WARNING__ |
345 self.configItems.update({ |
354 self.configItems.update({ |
346 "0helpBrowserPage": |
355 "0helpBrowserPage": |
452 "HelpFlashCookieManagerPage", None, None], |
461 "HelpFlashCookieManagerPage", None, None], |
453 "helpVirusTotalPage": |
462 "helpVirusTotalPage": |
454 [self.tr("VirusTotal Interface"), "virustotal.png", |
463 [self.tr("VirusTotal Interface"), "virustotal.png", |
455 "HelpVirusTotalPage", None, None], |
464 "HelpVirusTotalPage", None, None], |
456 } |
465 } |
|
466 |
|
467 if qVersion() >= "5.8.0": |
|
468 self.configItems.update({ |
|
469 "webBrowserSpellCheckingPage": |
|
470 [self.tr("Spell checking"), |
|
471 "preferences-spellchecking.png", |
|
472 "WebBrowserSpellCheckingPage", None, None], |
|
473 }) |
457 |
474 |
458 elif displayMode == ConfigurationWidget.TrayStarterMode: |
475 elif displayMode == ConfigurationWidget.TrayStarterMode: |
459 self.configItems = { |
476 self.configItems = { |
460 # key : [display string, pixmap name, dialog module name or |
477 # key : [display string, pixmap name, dialog module name or |
461 # page creation function, parent key, |
478 # page creation function, parent key, |