Merge pull request #292 from glutanimate/spell-check-envvar

Set QTWEBENGINE_DICTIONARIES_PATH to pave the way for spell checking
This commit is contained in:
Damien Elmes 2019-03-07 08:53:45 +10:00 committed by GitHub
commit b759346920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,7 @@ class AnkiQt(QMainWindow):
self.setupThreads() self.setupThreads()
self.setupMediaServer() self.setupMediaServer()
self.setupSound() self.setupSound()
self.setupSpellCheck()
self.setupMainWindow() self.setupMainWindow()
self.setupSystemSpecific() self.setupSystemSpecific()
self.setupStyle() self.setupStyle()
@ -637,6 +638,10 @@ title="%s" %s>%s</button>''' % (
if not self.safeMode: if not self.safeMode:
self.addonManager.loadAddons() self.addonManager.loadAddons()
def setupSpellCheck(self):
os.environ["QTWEBENGINE_DICTIONARIES_PATH"] = (
os.path.join(self.pm.base, "dictionaries"))
def setupThreads(self): def setupThreads(self):
self._mainThread = QThread.currentThread() self._mainThread = QThread.currentThread()