158 testResult = self.__testResults[row] |
158 testResult = self.__testResults[row] |
159 with contextlib.suppress(KeyError): |
159 with contextlib.suppress(KeyError): |
160 return self.__backgroundColors[testResult.category] |
160 return self.__backgroundColors[testResult.category] |
161 elif ( |
161 elif ( |
162 role == Qt.ItemDataRole.TextAlignmentRole |
162 role == Qt.ItemDataRole.TextAlignmentRole |
163 and idx == TopLevelId and column == TestResultsModel.DurationColumn |
163 and idx == TopLevelId |
|
164 and column == TestResultsModel.DurationColumn |
164 ): |
165 ): |
165 return Qt.AlignmentFlag.AlignRight.value |
166 return Qt.AlignmentFlag.AlignRight.value |
166 elif role == Qt.ItemDataRole.UserRole and idx == TopLevelId: |
167 elif role == Qt.ItemDataRole.UserRole and idx == TopLevelId: |
167 testresult = self.__testResults[row] |
168 testresult = self.__testResults[row] |
168 return (testresult.filename, testresult.lineno) |
169 return (testresult.filename, testresult.lineno) |