443 |
442 |
444 The results are reported to the __processResult slot. |
443 The results are reported to the __processResult slot. |
445 """ |
444 """ |
446 self.__lastFileItem = None |
445 self.__lastFileItem = None |
447 |
446 |
448 # Cancel doesn't work for batch jobs |
|
449 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
|
450 |
|
451 self.checkProgressLabel.setPath(self.tr("Preparing files...")) |
447 self.checkProgressLabel.setPath(self.tr("Preparing files...")) |
452 progress = 0 |
448 progress = 0 |
453 |
449 |
454 argumentsList = [] |
450 argumentsList = [] |
455 for filename in self.files: |
451 for filename in self.files: |
585 self.startButton.setEnabled(True) |
581 self.startButton.setEnabled(True) |
586 |
582 |
587 if self.noResults: |
583 if self.noResults: |
588 QTreeWidgetItem(self.resultList, [self.tr('No issues found.')]) |
584 QTreeWidgetItem(self.resultList, [self.tr('No issues found.')]) |
589 QApplication.processEvents() |
585 QApplication.processEvents() |
590 self.statisticsButton.setEnabled(False) |
|
591 self.showButton.setEnabled(False) |
586 self.showButton.setEnabled(False) |
592 else: |
587 else: |
593 self.statisticsButton.setEnabled(True) |
|
594 self.showButton.setEnabled(True) |
588 self.showButton.setEnabled(True) |
595 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) |
589 self.resultList.header().resizeSections(QHeaderView.ResizeToContents) |
596 self.resultList.header().setStretchLastSection(True) |
590 self.resultList.header().setStretchLastSection(True) |
597 |
591 |
598 self.checkProgress.setVisible(False) |
592 self.checkProgress.setVisible(False) |
854 @param button button that was clicked (QAbstractButton) |
848 @param button button that was clicked (QAbstractButton) |
855 """ |
849 """ |
856 if button == self.buttonBox.button(QDialogButtonBox.Close): |
850 if button == self.buttonBox.button(QDialogButtonBox.Close): |
857 self.close() |
851 self.close() |
858 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
852 elif button == self.buttonBox.button(QDialogButtonBox.Cancel): |
859 self.__finish() |
853 if self.__batch: |
|
854 self.styleCheckService.cancelStyleBatchCheck() |
|
855 else: |
|
856 self.__finish() |
860 elif button == self.showButton: |
857 elif button == self.showButton: |
861 self.on_showButton_clicked() |
858 self.on_showButton_clicked() |
862 elif button == self.statisticsButton: |
859 elif button == self.statisticsButton: |
863 self.on_statisticsButton_clicked() |
860 self.on_statisticsButton_clicked() |
864 |
861 |