45 @param isSingle flag indicating a single file dialog |
45 @param isSingle flag indicating a single file dialog |
46 @type bool |
46 @type bool |
47 @param parent reference to the parent widget |
47 @param parent reference to the parent widget |
48 @type QWidget |
48 @type QWidget |
49 """ |
49 """ |
50 super(CyclomaticComplexityDialog, self).__init__(parent) |
50 super().__init__(parent) |
51 self.setupUi(self) |
51 self.setupUi(self) |
52 self.setWindowFlags(Qt.Window) |
52 self.setWindowFlags(Qt.Window) |
53 |
53 |
54 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
54 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) |
55 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
55 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
380 The results are reported to the __processResult slot. |
380 The results are reported to the __processResult slot. |
381 """ |
381 """ |
382 self.__lastFileItem = None |
382 self.__lastFileItem = None |
383 |
383 |
384 self.checkProgressLabel.setPath(self.tr("Preparing files...")) |
384 self.checkProgressLabel.setPath(self.tr("Preparing files...")) |
385 progress = 0 |
|
386 |
385 |
387 argumentsList = [] |
386 argumentsList = [] |
388 for filename in self.files: |
387 for progress, filename in enumerate(self.files, start=1): |
389 progress += 1 |
|
390 self.checkProgress.setValue(progress) |
388 self.checkProgress.setValue(progress) |
391 QApplication.processEvents() |
389 QApplication.processEvents() |
392 |
390 |
393 try: |
391 try: |
394 source = Utilities.readEncodedFile(filename)[0] |
392 source = Utilities.readEncodedFile(filename)[0] |