227 if QFileInfo(fname).exists(): |
227 if QFileInfo(fname).exists(): |
228 res = E5MessageBox.yesNo(self, |
228 res = E5MessageBox.yesNo(self, |
229 self.trUtf8("Save regular expression"), |
229 self.trUtf8("Save regular expression"), |
230 self.trUtf8("<p>The file <b>{0}</b> already exists." |
230 self.trUtf8("<p>The file <b>{0}</b> already exists." |
231 " Overwrite it?</p>").format(fname), |
231 " Overwrite it?</p>").format(fname), |
232 type_ = E5MessageBox.Warning) |
232 icon = E5MessageBox.Warning) |
233 if not res: |
233 if not res: |
234 return |
234 return |
235 |
235 |
236 try: |
236 try: |
237 f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8") |
237 f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8") |