Plugins/VcsPlugins/vcsPySvn/SvnDialogMixin.py

changeset 4390
c0d9ef07020b
parent 4388
41c5865695b0
child 4631
5c1a96925da4
equal deleted inserted replaced
4388:41c5865695b0 4390:c0d9ef07020b
8 the pysvn client. 8 the pysvn client.
9 """ 9 """
10 10
11 from __future__ import unicode_literals 11 from __future__ import unicode_literals
12 12
13 from PyQt5.QtCore import Qt
13 from PyQt5.QtWidgets import QApplication, QDialog, QWidget 14 from PyQt5.QtWidgets import QApplication, QDialog, QWidget
14 15
15 16
16 class SvnDialogMixin(object): 17 class SvnDialogMixin(object):
17 """ 18 """
68 QApplication.restoreOverrideCursor() 69 QApplication.restoreOverrideCursor()
69 parent = isinstance(self, QWidget) and self or None 70 parent = isinstance(self, QWidget) and self or None
70 dlg = SvnLoginDialog(realm, username, may_save, parent) 71 dlg = SvnLoginDialog(realm, username, may_save, parent)
71 res = dlg.exec_() 72 res = dlg.exec_()
72 if cursor is not None: 73 if cursor is not None:
73 QApplication.setOverrideCursor(cursor) 74 QApplication.setOverrideCursor(Qt.WaitCursor)
74 if res == QDialog.Accepted: 75 if res == QDialog.Accepted:
75 loginData = dlg.getData() 76 loginData = dlg.getData()
76 return (True, loginData[0], loginData[1], loginData[2]) 77 return (True, loginData[0], loginData[1], loginData[2])
77 else: 78 else:
78 return (False, "", "", False) 79 return (False, "", "", False)
118 tempButton = msgBox.addButton(self.tr("&Temporary accept"), 119 tempButton = msgBox.addButton(self.tr("&Temporary accept"),
119 E5MessageBox.AcceptRole) 120 E5MessageBox.AcceptRole)
120 msgBox.addButton(self.tr("&Reject"), E5MessageBox.RejectRole) 121 msgBox.addButton(self.tr("&Reject"), E5MessageBox.RejectRole)
121 msgBox.exec_() 122 msgBox.exec_()
122 if cursor is not None: 123 if cursor is not None:
123 QApplication.setOverrideCursor(cursor) 124 QApplication.setOverrideCursor(Qt.WaitCursor)
124 if msgBox.clickedButton() == permButton: 125 if msgBox.clickedButton() == permButton:
125 return (True, trust_dict["failures"], True) 126 return (True, trust_dict["failures"], True)
126 elif msgBox.clickedButton() == tempButton: 127 elif msgBox.clickedButton() == tempButton:
127 return (True, trust_dict["failures"], False) 128 return (True, trust_dict["failures"], False)
128 else: 129 else:

eric ide

mercurial