182 with open(fname, "w", encoding="utf-8") as f: |
182 with open(fname, "w", encoding="utf-8") as f: |
183 f.write("{0}\n".format(title)) |
183 f.write("{0}\n".format(title)) |
184 f.write("{0}\n\n".format(len(title) * "=")) |
184 f.write("{0}\n\n".format(len(title) * "=")) |
185 itm = self.callTrace.topLevelItem(0) |
185 itm = self.callTrace.topLevelItem(0) |
186 while itm is not None: |
186 while itm is not None: |
187 isCall = itm.data(0, Qt.UserRole) |
187 isCall = itm.data(0, Qt.ItemDataRole.UserRole) |
188 if isCall: |
188 if isCall: |
189 call = "->" |
189 call = "->" |
190 else: |
190 else: |
191 call = "<-" |
191 call = "<-" |
192 f.write("{0} {1} || {2}\n".format( |
192 f.write("{0} {1} || {2}\n".format( |
285 parentItem, |
285 parentItem, |
286 ["", |
286 ["", |
287 self.__entryFormat.format(fromFile, fromLine, fromFunction), |
287 self.__entryFormat.format(fromFile, fromLine, fromFunction), |
288 self.__entryFormat.format(toFile, toLine, toFunction)]) |
288 self.__entryFormat.format(toFile, toLine, toFunction)]) |
289 itm.setIcon(0, icon) |
289 itm.setIcon(0, icon) |
290 itm.setData(0, Qt.UserRole, isCall) |
290 itm.setData(0, Qt.ItemDataRole.UserRole, isCall) |
291 itm.setExpanded(True) |
291 itm.setExpanded(True) |
292 |
292 |
293 if isCall: |
293 if isCall: |
294 self.__callStack.append(itm) |
294 self.__callStack.append(itm) |
295 else: |
295 else: |