E5Network/E5SslInfoWidget.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3201
0f115f6db6cb
child 3656
441956d8fce5
child 3775
d16e898258f3
--- a/E5Network/E5SslInfoWidget.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/E5Network/E5SslInfoWidget.py	Thu Apr 03 23:05:31 2014 +0200
@@ -34,7 +34,6 @@
         self.__url = QUrl(url)
         self.__configuration = QSslConfiguration(configuration)
         
-        self.setAttribute(Qt.WA_DeleteOnClose)
         self.setMinimumWidth(400)
         
         certList = self.__configuration.peerCertificateChain()
@@ -55,7 +54,7 @@
         label = QLabel(self)
         label.setWordWrap(True)
         label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
-        label.setText(self.trUtf8("Identity"))
+        label.setText(self.tr("Identity"))
         font = label.font()
         font.setBold(True)
         label.setFont(font)
@@ -65,7 +64,7 @@
         label = QLabel(self)
         label.setWordWrap(True)
         if cert.isNull():
-            label.setText(self.trUtf8(
+            label.setText(self.tr(
                 "Warning: this site is NOT carrying a certificate."))
             imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
         else:
@@ -79,14 +78,14 @@
                         cert.issuerInfo(QSslCertificate.CommonName))
                 else:
                     txt = cert.issuerInfo(QSslCertificate.CommonName)
-                label.setText(self.trUtf8(
+                label.setText(self.tr(
                     "The certificate for this site is valid"
                     " and has been verified by:\n{0}").format(
                     Utilities.decodeString(txt)))
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityHigh32.png"))
             else:
-                label.setText(self.trUtf8(
+                label.setText(self.tr(
                     "The certificate for this site is NOT valid."))
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32.png"))
@@ -97,7 +96,7 @@
             label.setWordWrap(True)
             label.setText(
                 '<a href="moresslinfos">' +
-                self.trUtf8("Certificate Information") + "</a>")
+                self.tr("Certificate Information") + "</a>")
             label.linkActivated.connect(self.__showCertificateInfos)
             layout.addWidget(label, rows, 1)
             rows += 1
@@ -110,7 +109,7 @@
         
         label = QLabel(self)
         label.setWordWrap(True)
-        label.setText(self.trUtf8("Encryption"))
+        label.setText(self.tr("Encryption"))
         font = label.font()
         font.setBold(True)
         label.setFont(font)
@@ -121,7 +120,7 @@
         if cipher.isNull():
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText(self.trUtf8(
+            label.setText(self.tr(
                 'Your connection to "{0}" is NOT encrypted.\n').format(
                 self.__url.host()))
             layout.addWidget(label, rows, 1)
@@ -130,7 +129,7 @@
         else:
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText(self.trUtf8(
+            label.setText(self.tr(
                 'Your connection to "{0}" is encrypted.').format(
                 self.__url.host()))
             layout.addWidget(label, rows, 1)
@@ -149,21 +148,21 @@
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32.png"))
             else:
-                sslVersion = self.trUtf8("unknown")
+                sslVersion = self.tr("unknown")
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32.png"))
             rows += 1
             
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText(self.trUtf8(
+            label.setText(self.tr(
                 "It uses protocol: {0}").format(sslVersion))
             layout.addWidget(label, rows, 1)
             rows += 1
             
             label = QLabel(self)
             label.setWordWrap(True)
-            label.setText(self.trUtf8(
+            label.setText(self.tr(
                 "It is encrypted using {0} at {1} bits, "
                 "with {2} for message authentication and "
                 "{3} as key exchange mechanism.\n\n").format(

eric ide

mercurial