Set QTWEBENGINE_DICTIONARIES_PATH

This introduces the possibility for add-ons to supply spell checking
support in web views.
This commit is contained in:
Glutanimate 2019-03-06 14:18:26 +01:00
parent 0543df7dfa
commit 324370497e

View file

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