diff --git a/src/document/katedocument.cpp b/src/document/katedocument.cpp --- a/src/document/katedocument.cpp +++ b/src/document/katedocument.cpp @@ -5053,6 +5053,7 @@ QStringLiteral("indent-pasted-text"), QStringLiteral("tab-width"), QStringLiteral("indent-width"), + QStringLiteral("on-the-fly-spellcheck"), }; return keys; } @@ -5075,6 +5076,8 @@ return m_config->tabWidth(); } else if (key == QLatin1String("indent-width")) { return m_config->indentationWidth(); + } else if (key == QLatin1String("on-the-fly-spellcheck")) { + return isOnTheFlySpellCheckingEnabled(); } // return invalid variant @@ -5113,6 +5116,8 @@ m_config->setReplaceTabsDyn(bValue); } else if (key == QLatin1String("indent-pasted-text")) { m_config->setIndentPastedText(bValue); + } else if (key == QLatin1String("on-the-fly-spellcheck")) { + onTheFlySpellCheckingEnabled(bValue); } } else if (value.canConvert(QVariant::Int)) { if (key == QLatin1String("tab-width")) { diff --git a/src/include/ktexteditor/configinterface.h b/src/include/ktexteditor/configinterface.h --- a/src/include/ktexteditor/configinterface.h +++ b/src/include/ktexteditor/configinterface.h @@ -87,6 +87,7 @@ * - word-count [bool] enable/disable the counting of words and characters in the statusbar * - scrollbar-minimap [bool] enable/disable scrollbar minimap * - scrollbar-preview [bool] enable/disable scrollbar text preview on hover + * - font [QFont] change the font * * KTextEditor::Document has support for the following: * - backup-on-save-local [bool], enable/disable backup when saving local files @@ -97,6 +98,7 @@ * - indent-pasted-text [bool], whether to indent pasted text * - tab-width [int], read/set the width for tabs * - indent-width [int], read/set the indentation width + * - on-the-fly-spellcheck [bool], enable/disable on the fly spellcheck * * Either interface should emit the \p configChanged signal when appropriate. * TODO: Add to interface in KDE 5. diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp --- a/src/view/kateview.cpp +++ b/src/view/kateview.cpp @@ -3028,7 +3028,8 @@ QStringLiteral("keyword-completion"), QStringLiteral("word-count"), QStringLiteral("scrollbar-minimap"), - QStringLiteral("scrollbar-preview") + QStringLiteral("scrollbar-preview"), + QStringLiteral("font") }; return keys; } @@ -3075,6 +3076,8 @@ return config()->scrollBarMiniMap(); } else if (key == QLatin1String("scrollbar-preview")) { return config()->scrollBarPreview(); + } else if (key == QLatin1String("font")) { + return renderer()->config()->font(); } // return invalid variant @@ -3133,6 +3136,11 @@ if (key == QLatin1String("default-mark-type")) { config()->setDefaultMarkType(value.toUInt()); } + + } else if (value.canConvert(QVariant::Font)) { + if (key == QLatin1String("font")) { + renderer()->config()->setFont(value.value()); + } } }