313 if QFileInfo(fname).exists(): |
313 if QFileInfo(fname).exists(): |
314 res = E5MessageBox.yesNo(self, |
314 res = E5MessageBox.yesNo(self, |
315 self.trUtf8("Save regular expression"), |
315 self.trUtf8("Save regular expression"), |
316 self.trUtf8("<p>The file <b>{0}</b> already exists." |
316 self.trUtf8("<p>The file <b>{0}</b> already exists." |
317 " Overwrite it?</p>").format(fname), |
317 " Overwrite it?</p>").format(fname), |
318 type_ = E5MessageBox.Warning) |
318 icon = E5MessageBox.Warning) |
319 if not res: |
319 if not res: |
320 return |
320 return |
321 |
321 |
322 try: |
322 try: |
323 f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8") |
323 f=open(Utilities.toNativeSeparators(fname), "w", encoding = "utf-8") |