130 if not ext: |
130 if not ext: |
131 ex = selectedFilter.split("(*")[1].split(")")[0] |
131 ex = selectedFilter.split("(*")[1].split(")")[0] |
132 if ex: |
132 if ex: |
133 fname += ex |
133 fname += ex |
134 if QFileInfo(fname).exists(): |
134 if QFileInfo(fname).exists(): |
135 res = E5MessageBox.yesNo(self, |
135 res = E5MessageBox.yesNo( |
|
136 self, |
136 self.trUtf8("Save Call Trace Info"), |
137 self.trUtf8("Save Call Trace Info"), |
137 self.trUtf8("<p>The file <b>{0}</b> already exists." |
138 self.trUtf8("<p>The file <b>{0}</b> already exists." |
138 " Overwrite it?</p>").format(fname), |
139 " Overwrite it?</p>").format(fname), |
139 icon=E5MessageBox.Warning) |
140 icon=E5MessageBox.Warning) |
140 if not res: |
141 if not res: |
153 f.write("{0} {1} || {2}\n".format(call, |
154 f.write("{0} {1} || {2}\n".format(call, |
154 itm.text(1), itm.text(2))) |
155 itm.text(1), itm.text(2))) |
155 itm = self.callTrace.itemBelow(itm) |
156 itm = self.callTrace.itemBelow(itm) |
156 f.close() |
157 f.close() |
157 except IOError as err: |
158 except IOError as err: |
158 E5MessageBox.critical(self, |
159 E5MessageBox.critical( |
|
160 self, |
159 self.trUtf8("Error saving Call Trace Info"), |
161 self.trUtf8("Error saving Call Trace Info"), |
160 self.trUtf8("""<p>The call trace info could not""" |
162 self.trUtf8("""<p>The call trace info could not""" |
161 """ be written to <b>{0}</b></p>""" |
163 """ be written to <b>{0}</b></p>""" |
162 """<p>Reason: {1}</p>""")\ |
164 """<p>Reason: {1}</p>""")\ |
163 .format(fname, str(err))) |
165 .format(fname, str(err))) |