Helpviewer/HelpBrowserWV.py

changeset 2078
9f4a45741622
parent 1970
02cf3bac079b
child 2087
795992a5c561
equal deleted inserted replaced
2077:68a34718a0ce 2078:9f4a45741622
8 Module implementing the helpbrowser using QWebView. 8 Module implementing the helpbrowser using QWebView.
9 """ 9 """
10 10
11 from PyQt4.QtCore import pyqtSlot, pyqtSignal, QObject, QT_TRANSLATE_NOOP, QUrl, \ 11 from PyQt4.QtCore import pyqtSlot, pyqtSignal, QObject, QT_TRANSLATE_NOOP, QUrl, \
12 QBuffer, QIODevice, QFileInfo, Qt, QTimer, QEvent, QRect, QFile, QPoint, \ 12 QBuffer, QIODevice, QFileInfo, Qt, QTimer, QEvent, QRect, QFile, QPoint, \
13 QByteArray 13 QByteArray, qVersion
14 from PyQt4.QtGui import qApp, QDesktopServices, QStyle, QMenu, QApplication, \ 14 from PyQt4.QtGui import qApp, QDesktopServices, QStyle, QMenu, QApplication, \
15 QInputDialog, QLineEdit, QClipboard, QMouseEvent, QLabel, QToolTip, QColor, \ 15 QInputDialog, QLineEdit, QClipboard, QMouseEvent, QLabel, QToolTip, QColor, \
16 QPalette, QFrame, QPrinter, QPrintDialog, QDialog 16 QPalette, QFrame, QPrinter, QPrintDialog, QDialog
17 from PyQt4.QtWebKit import QWebView, QWebPage, QWebSettings 17 from PyQt4.QtWebKit import QWebView, QWebPage, QWebSettings
18 try: 18 try:
517 localCAList = QSslCertificate.fromData(certificateDict[server]) 517 localCAList = QSslCertificate.fromData(certificateDict[server])
518 for cert in certList: 518 for cert in certList:
519 if cert in localCAList: 519 if cert in localCAList:
520 return True 520 return True
521 521
522 for cert in certList: 522 if qVersion() >= "5.0.0":
523 if not cert.isValid(): 523 for cert in certList:
524 return False 524 if cert.isBlacklisted():
525 return False
526 else:
527 for cert in certList:
528 if not cert.isValid():
529 return False
525 530
526 return True 531 return True
527 532
528 @classmethod 533 @classmethod
529 def webPluginFactory(cls): 534 def webPluginFactory(cls):

eric ide

mercurial