Chris Cannam avatar Chris Cannam committed e34de48

Update for PyQt 4.5+ signal/slot connection syntax

Comments (0)

Files changed (1)

 easyhg_pyqt_ok = True
-    from PyQt4 import Qt, QtCore, QtGui
+    from PyQt4 import QtCore, QtGui
 except ImportError:
     easyhg_pyqt_ok = False
 easyhg_qtapp = None
         if self.auth_store.passwd: passwd_field.setText(self.auth_store.passwd)
         layout.addWidget(QtGui.QLabel(_('Password:')), 2, 0)
         layout.addWidget(passwd_field, 2, 1)
-        user_field.connect(user_field, Qt.SIGNAL("textChanged(QString)"),
-                           passwd_field, Qt.SLOT("clear()"))
+        user_field.textChanged.connect(passwd_field.clear)
         remember_field = None
         if self.auth_store.use_auth_file:
             warning_field = QtGui.QLabel()
             warning_field.setText(_('<qt><i><small>Do not use this option if anyone else has access to your computer!</small></i><br></qt>'))
-            remember_field.connect(remember_field, Qt.SIGNAL("clicked()"),
-                                   warning_field, Qt.SLOT("show()"))
+            remember_field.clicked.connect(
             layout.addWidget(warning_field, 4, 1, QtCore.Qt.AlignRight)
         bb = QtGui.QDialogButtonBox()
-        bb.connect(ok, Qt.SIGNAL("clicked()"), dialog, Qt.SLOT("accept()"))
-        bb.connect(cancel, Qt.SIGNAL("clicked()"), dialog, Qt.SLOT("reject()"))
+        ok.clicked.connect(dialog.accept)
+        cancel.clicked.connect(dialog.reject)
         layout.addWidget(bb, 5, 0, 1, 2)
         dialog.setWindowTitle(_('EasyMercurial: Login'))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.