Sat, 28 Sep 2013 16:39:31 +0200
Some enhancements to the coding style checker dialog.
Plugins/CheckerPlugins/Pep8/Pep8Dialog.py | file | annotate | diff | comparison | revisions | |
Plugins/CheckerPlugins/Pep8/Pep8Dialog.ui | file | annotate | diff | comparison | revisions |
--- a/Plugins/CheckerPlugins/Pep8/Pep8Dialog.py Sat Sep 28 16:20:06 2013 +0200 +++ b/Plugins/CheckerPlugins/Pep8/Pep8Dialog.py Sat Sep 28 16:39:31 2013 +0200 @@ -107,6 +107,10 @@ self.resultList.headerItem().setText(self.resultList.columnCount(), "") self.resultList.header().setSortIndicator(0, Qt.AscendingOrder) + self.checkProgress.setVisible(False) + self.checkProgressLabel.setVisible(False) + self.checkProgressLabel.setMaximumWidth(600) + self.noResults = True self.cancelled = False self.__lastFileItem = None @@ -311,6 +315,7 @@ self.startButton.setEnabled(False) if repeat is not None: self.repeatCheckBox.setChecked(repeat) + self.checkProgress.setVisible(True) QApplication.processEvents() self.__resetStatistics() @@ -350,6 +355,8 @@ if len(py3files) + len(py2files) > 0: self.checkProgress.setMaximum(len(py3files) + len(py2files)) + self.checkProgressLabel.setVisible( + len(py3files) + len(py2files) > 1) QApplication.processEvents() # extract the configuration values @@ -371,8 +378,9 @@ # now go through all the files progress = 0 - for file in py3files + py2files: + for file in sorted(py3files + py2files): self.checkProgress.setValue(progress) + self.checkProgressLabel.setPath(file) QApplication.processEvents() if self.cancelled: @@ -412,7 +420,6 @@ self.__project.getProjectLanguage() in ["Python", "Python2"]): from .Pep8Checker import Pep8Py2Checker - # TODO: add the docType into the Py2 variant report = Pep8Py2Checker(file, [], repeat=repeatMessages, select=includeMessages, @@ -500,6 +507,7 @@ self.resultList.setSortingEnabled(True) self.resultList.setUpdatesEnabled(True) self.checkProgress.setValue(progress) + self.checkProgressLabel.setPath("") QApplication.processEvents() self.__resort() else: @@ -531,6 +539,9 @@ self.showButton.setEnabled(True) self.resultList.header().resizeSections(QHeaderView.ResizeToContents) self.resultList.header().setStretchLastSection(True) + + self.checkProgress.setVisible(False) + self.checkProgressLabel.setVisible(False) @pyqtSlot() def on_startButton_clicked(self):
--- a/Plugins/CheckerPlugins/Pep8/Pep8Dialog.ui Sat Sep 28 16:20:06 2013 +0200 +++ b/Plugins/CheckerPlugins/Pep8/Pep8Dialog.ui Sat Sep 28 16:39:31 2013 +0200 @@ -376,11 +376,8 @@ <zorder>noFixIssuesEdit</zorder> <zorder>noFixIssuesSelectButton</zorder> <zorder>label_5</zorder> - <zorder>hangClosingCheckBox</zorder> <zorder></zorder> <zorder>label_7</zorder> - <zorder>docTypeComboBox</zorder> - <zorder>horizontalSpacer_4</zorder> </widget> </item> <item> @@ -418,6 +415,19 @@ </widget> </item> <item> + <widget class="E5SqueezeLabelPath" name="checkProgressLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> <widget class="QProgressBar" name="checkProgress"> <property name="toolTip"> <string>Shows the progress of the style check check</string> @@ -446,6 +456,11 @@ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> <customwidgets> <customwidget> + <class>E5SqueezeLabelPath</class> + <extends>QLabel</extends> + <header>E5Gui/E5SqueezeLabels.h</header> + </customwidget> + <customwidget> <class>E5ClearableLineEdit</class> <extends>QLineEdit</extends> <header>E5Gui/E5LineEdit.h</header>