14 pass |
14 pass |
15 |
15 |
16 import os |
16 import os |
17 |
17 |
18 from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, \ |
18 from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, \ |
19 QSize, QPoint |
19 QSize, QPoint |
20 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, \ |
20 from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, \ |
21 QTreeWidgetItem, QApplication, QCursor, QLineEdit, QColor, \ |
21 QTreeWidgetItem, QApplication, QCursor, QLineEdit, QColor, \ |
22 QPixmap, QPainter, QPen, QBrush, QIcon |
22 QPixmap, QPainter, QPen, QBrush, QIcon |
23 |
23 |
24 from E5Gui.E5Application import e5App |
24 from E5Gui.E5Application import e5App |
937 """ |
937 """ |
938 self.process.setReadChannel(QProcess.StandardOutput) |
938 self.process.setReadChannel(QProcess.StandardOutput) |
939 |
939 |
940 while self.process.canReadLine(): |
940 while self.process.canReadLine(): |
941 line = str(self.process.readLine(), |
941 line = str(self.process.readLine(), |
942 Preferences.getSystem("IOEncoding"), |
942 Preferences.getSystem("IOEncoding"), |
943 'replace') |
943 'replace') |
944 self.buf.append(line) |
944 self.buf.append(line) |
945 |
945 |
946 def __readStderr(self): |
946 def __readStderr(self): |
947 """ |
947 """ |
948 Private slot to handle the readyReadStandardError signal. |
948 Private slot to handle the readyReadStandardError signal. |
950 It reads the error output of the process and inserts it into the |
950 It reads the error output of the process and inserts it into the |
951 error pane. |
951 error pane. |
952 """ |
952 """ |
953 if self.process is not None: |
953 if self.process is not None: |
954 s = str(self.process.readAllStandardError(), |
954 s = str(self.process.readAllStandardError(), |
955 Preferences.getSystem("IOEncoding"), |
955 Preferences.getSystem("IOEncoding"), |
956 'replace') |
956 'replace') |
957 self.__showError(s) |
957 self.__showError(s) |
958 |
958 |
959 def __showError(self, out): |
959 def __showError(self, out): |
960 """ |
960 """ |
961 Private slot to show some error. |
961 Private slot to show some error. |
1045 else: |
1045 else: |
1046 public += 1 |
1046 public += 1 |
1047 |
1047 |
1048 # step 2: set the status of the phase button |
1048 # step 2: set the status of the phase button |
1049 if public == 0 and \ |
1049 if public == 0 and \ |
1050 ((secret > 0 and draft == 0) or \ |
1050 ((secret > 0 and draft == 0) or |
1051 (secret == 0 and draft > 0)): |
1051 (secret == 0 and draft > 0)): |
1052 self.phaseButton.setEnabled(True) |
1052 self.phaseButton.setEnabled(True) |
1053 else: |
1053 else: |
1054 self.phaseButton.setEnabled(False) |
1054 self.phaseButton.setEnabled(False) |
1055 else: |
1055 else: |
1056 self.phaseButton.setEnabled(False) |
1056 self.phaseButton.setEnabled(False) |
1257 currentItem = self.logTree.currentItem() |
1257 currentItem = self.logTree.currentItem() |
1258 for topIndex in range(self.logTree.topLevelItemCount()): |
1258 for topIndex in range(self.logTree.topLevelItemCount()): |
1259 topItem = self.logTree.topLevelItem(topIndex) |
1259 topItem = self.logTree.topLevelItem(topIndex) |
1260 if topItem.text(self.DateColumn) <= to_ and \ |
1260 if topItem.text(self.DateColumn) <= to_ and \ |
1261 topItem.text(self.DateColumn) >= from_ and \ |
1261 topItem.text(self.DateColumn) >= from_ and \ |
1262 (branch == self.__allBranchesFilter or \ |
1262 (branch == self.__allBranchesFilter or |
1263 topItem.text(self.BranchColumn) in \ |
1263 topItem.text(self.BranchColumn) in |
1264 [branch, closedBranch]) and \ |
1264 [branch, closedBranch]) and \ |
1265 searchRx.indexIn(topItem.text(fieldIndex)) > -1: |
1265 searchRx.indexIn(topItem.text(fieldIndex)) > -1: |
1266 topItem.setHidden(False) |
1266 topItem.setHidden(False) |
1267 if topItem is currentItem: |
1267 if topItem is currentItem: |
1268 self.on_logTree_currentItemChanged(topItem, None) |
1268 self.on_logTree_currentItemChanged(topItem, None) |