(self, message, icon, replace=False)
| 983 | return s.get_data() |
| 984 | |
| 985 | def addMessage(self, message, icon, replace=False): |
| 986 | if icon != '': |
| 987 | icon = getattr(self.icons, icon) |
| 988 | item = QListWidgetItem(icon, ' ' + self.stripTags(message)) |
| 989 | else: |
| 990 | item = QListWidgetItem(' ' + self.stripTags(message)) |
| 991 | if replace: |
| 992 | GUI.jobList.takeItem(GUI.jobList.count() - 1) |
| 993 | # Due to lack of HTML support in QListWidgetItem we overlay text field with QLabel |
| 994 | # We still fill original text field with transparent content to trigger creation of horizontal scrollbar |
| 995 | item.setForeground(QColor('transparent')) |
| 996 | label = QLabel(message) |
| 997 | label.setOpenExternalLinks(True) |
| 998 | GUI.jobList.addItem(item) |
| 999 | GUI.jobList.setItemWidget(item, label) |
| 1000 | GUI.jobList.scrollToBottom() |
| 1001 | |
| 1002 | def showDialog(self, message, kind): |
| 1003 | if kind == 'error': |
no test coverage detected