9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 |
13 |
14 from PyQt5.QtCore import pyqtSlot, QUrl, Qt, QFile, qVersion |
14 from PyQt5.QtCore import pyqtSlot, QUrl, Qt, QFile |
15 from PyQt5.QtGui import QPixmap, QCursor, QPainter, QColor, QBrush |
15 from PyQt5.QtGui import QPixmap, QCursor, QPainter, QColor, QBrush |
16 from PyQt5.QtWidgets import QDialog, QTreeWidgetItem, QGraphicsScene, QMenu, \ |
16 from PyQt5.QtWidgets import QDialog, QTreeWidgetItem, QGraphicsScene, QMenu, \ |
17 QApplication, QListWidgetItem |
17 QApplication, QListWidgetItem |
18 from PyQt5.QtWebKit import QWebSettings |
18 from PyQt5.QtWebKit import QWebSettings |
19 |
19 |
106 encoding = QWebSettings.globalSettings().defaultTextEncoding() |
107 encoding = QWebSettings.globalSettings().defaultTextEncoding() |
107 self.encodingLabel.setText(encoding) |
108 self.encodingLabel.setText(encoding) |
108 |
109 |
109 # populate the Security info and the Security tab |
110 # populate the Security info and the Security tab |
110 if sslInfo and \ |
111 if sslInfo and \ |
111 ((qVersion() >= "5.0.0" and not sslInfo[0].isBlacklisted()) or |
112 ((qVersionTuple() >= (5, 0, 0) and |
112 (qVersion() < "5.0.0" and sslInfo[0].isValid())): |
113 not sslInfo[0].isBlacklisted()) or |
|
114 (qVersionTuple() < (5, 0, 0) and sslInfo[0].isValid())): |
113 self.securityLabel.setStyleSheet(SiteInfoDialog.okStyle) |
115 self.securityLabel.setStyleSheet(SiteInfoDialog.okStyle) |
114 self.securityLabel.setText('<b>Connection is encrypted.</b>') |
116 self.securityLabel.setText('<b>Connection is encrypted.</b>') |
115 if SSL: |
117 if SSL: |
116 self.sslWidget.showCertificateChain(sslInfo) |
118 self.sslWidget.showCertificateChain(sslInfo) |
117 self.securityDetailsButton.setEnabled(True) |
119 self.securityDetailsButton.setEnabled(True) |