Add GuiWordList test

This commit is contained in:
Veronica K. B. Olsen
2021-02-12 22:00:22 +01:00
parent ff1d625dc8
commit fca5c77089
4 changed files with 137 additions and 3 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ class NWSpellEnchant(NWSpellCheck):
try:
import enchant
if self.theBroker is not None:
logger.verbose("Deleting old pyenchant Broker")
logger.verbose("Deleting old pyenchant broker")
del self.theBroker
self.theBroker = enchant.Broker()
+2 -1
View File
@@ -160,13 +160,14 @@ class GuiWordList(QDialog):
logger.error("Could not save new word list")
nw.logException()
self.reject()
return False
if os.path.isfile(dctFile):
os.unlink(dctFile)
os.rename(tmpFile, dctFile)
self.accept()
return
return True
def _doClose(self):
"""Close without saving the word list.