From c57651022729b5ec82090f98b262c4a5c44221d5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Feb 2022 12:45:25 +0530 Subject: [PATCH] More pyqt6 goodness Have to wrap locales in QVariant otherwise pyqt6 treats them a QList --- src/calibre/gui2/tweak_book/editor/syntax/html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/syntax/html.py b/src/calibre/gui2/tweak_book/editor/syntax/html.py index 44b8280ae6..ec346bdbbf 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/html.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/html.py @@ -7,7 +7,7 @@ __copyright__ = '2013, Kovid Goyal ' import re from collections import namedtuple 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.gui2.tweak_book import dictionaries, tprefs, verify_link @@ -71,7 +71,7 @@ State = _speedup.State def spell_property(sfmt, locale): s = QTextCharFormat(sfmt) - s.setProperty(SPELL_LOCALE_PROPERTY, locale) + s.setProperty(SPELL_LOCALE_PROPERTY, QVariant(locale)) return s