Commit f0b05cae authored by C. Boemann's avatar C. Boemann

Let the spellchecker take country into consideration too

BUG:292020
parent 9a47b635
...@@ -64,7 +64,7 @@ void BgSpellCheck::startRun(QTextDocument *document, int startPosition, int endP ...@@ -64,7 +64,7 @@ void BgSpellCheck::startRun(QTextDocument *document, int startPosition, int endP
if (m_currentLanguage != m_defaultLanguage || m_currentCountry != m_defaultCountry) { if (m_currentLanguage != m_defaultLanguage || m_currentCountry != m_defaultCountry) {
m_currentCountry = m_defaultCountry; m_currentCountry = m_defaultCountry;
m_currentLanguage = m_defaultLanguage; m_currentLanguage = m_defaultLanguage;
changeLanguage(m_currentLanguage); changeLanguage(m_currentLanguage+'_'+m_currentCountry);
} }
if (m_currentPosition < m_endPosition) { if (m_currentPosition < m_endPosition) {
kDebug(31000) << "Starting:" << m_currentPosition << m_endPosition; kDebug(31000) << "Starting:" << m_currentPosition << m_endPosition;
...@@ -148,13 +148,12 @@ QString BgSpellCheck::fetchMoreText() ...@@ -148,13 +148,12 @@ QString BgSpellCheck::fetchMoreText()
if (m_currentLanguage != language || m_currentCountry != country) { if (m_currentLanguage != language || m_currentCountry != country) {
kDebug(31000) << "switching to language" << language << country; kDebug(31000) << "switching to language" << language << country;
// hmm, seems we can't set country. *shrug* m_currentLanguage = language;
m_currentCountry = country;
#if 0 #if 0
Disabling this as sonnet crashes on this. See https://bugs.kde.org/228271 Disabling this as sonnet crashes on this. See https://bugs.kde.org/228271
changeLanguage(language); changeLanguage(m_currentLanguage+'_'+m_currentCountry);
#endif #endif
m_currentLanguage = language;
m_currentCountry = country;
} }
QTextCursor cursor(m_document); QTextCursor cursor(m_document);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment