diff options
author | David Schulz <david.schulz@qt.io> | 2016-06-01 10:19:59 +0200 |
---|---|---|
committer | David Schulz <david.schulz@theqtcompany.com> | 2016-06-13 05:08:07 +0000 |
commit | 9bacb3e33e46b3a15ab3c803eb014e85d91c97b9 (patch) | |
tree | 54e0bcadbf697f7e3ea3771847b9d373086ef851 /src/plugins/texteditor/completionsettings.cpp | |
parent | 6a2e9a1f0654ed0acdb459501f28b829e43c7473 (diff) |
Editor: Highlight automatically inserted text
Keep the highlight as long as the cursor is directly behind the closing
character and the editor is the focus widget.
Change-Id: Ic1d4bac263e9d2f395791dad7ecdceb9d69635c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/texteditor/completionsettings.cpp')
-rw-r--r-- | src/plugins/texteditor/completionsettings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/texteditor/completionsettings.cpp b/src/plugins/texteditor/completionsettings.cpp index 325b758028..8bdcbded95 100644 --- a/src/plugins/texteditor/completionsettings.cpp +++ b/src/plugins/texteditor/completionsettings.cpp @@ -39,6 +39,7 @@ static const char partiallyCompleteKey[] = "PartiallyComplete"; static const char spaceAfterFunctionNameKey[] = "SpaceAfterFunctionName"; static const char autoSplitStringsKey[] = "AutoSplitStrings"; static const char animateAutoCompleteKey[] = "AnimateAutoComplete"; +static const char highlightAutoCompleteKey[] = "HighlightAutoComplete"; using namespace TextEditor; @@ -56,6 +57,7 @@ void CompletionSettings::toSettings(QSettings *s) const s->setValue(spaceAfterFunctionNameKey, m_spaceAfterFunctionName); s->setValue(autoSplitStringsKey, m_autoSplitStrings); s->setValue(animateAutoCompleteKey, m_animateAutoComplete); + s->setValue(highlightAutoCompleteKey, m_highlightAutoComplete); s->endGroup(); } @@ -86,6 +88,8 @@ void CompletionSettings::fromSettings(QSettings *s) s->value(autoSplitStringsKey, m_autoSplitStrings).toBool(); m_animateAutoComplete = s->value(animateAutoCompleteKey, m_animateAutoComplete).toBool(); + m_highlightAutoComplete = + s->value(highlightAutoCompleteKey, m_highlightAutoComplete).toBool(); s->endGroup(); } @@ -102,5 +106,6 @@ bool CompletionSettings::equals(const CompletionSettings &cs) const && m_spaceAfterFunctionName == cs.m_spaceAfterFunctionName && m_autoSplitStrings == cs.m_autoSplitStrings && m_animateAutoComplete == cs.m_animateAutoComplete + && m_highlightAutoComplete == cs.m_highlightAutoComplete ; } |