mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More pyqt6 goodness
Have to wrap locales in QVariant otherwise pyqt6 treats them a QList<QTextLength>
This commit is contained in:
parent
f375ec0809
commit
c576510227
@ -7,7 +7,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
import re
|
import re
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from qt.core import QFont, QTextBlockUserData, QTextCharFormat
|
from qt.core import QFont, QTextBlockUserData, QTextCharFormat, QVariant
|
||||||
|
|
||||||
from calibre.ebooks.oeb.polish.spell import html_spell_tags, patterns, xml_spell_tags
|
from calibre.ebooks.oeb.polish.spell import html_spell_tags, patterns, xml_spell_tags
|
||||||
from calibre.gui2.tweak_book import dictionaries, tprefs, verify_link
|
from calibre.gui2.tweak_book import dictionaries, tprefs, verify_link
|
||||||
@ -71,7 +71,7 @@ State = _speedup.State
|
|||||||
|
|
||||||
def spell_property(sfmt, locale):
|
def spell_property(sfmt, locale):
|
||||||
s = QTextCharFormat(sfmt)
|
s = QTextCharFormat(sfmt)
|
||||||
s.setProperty(SPELL_LOCALE_PROPERTY, locale)
|
s.setProperty(SPELL_LOCALE_PROPERTY, QVariant(locale))
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user