aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/autocompleter.h
diff options
context:
space:
mode:
authorJoel Smith <joel.m.smith@gmail.com>2019-05-15 21:50:28 -0700
committerJoel Smith <joel.m.smith@gmail.com>2019-05-27 14:09:12 +0000
commite846b8717aad09e71650c6ca95b05d320f1eb3f1 (patch)
tree818bc7e5fb6cfa9ff754b75eb7057d7e36e8b00d /src/plugins/texteditor/autocompleter.h
parent0980484be856a71d704bad7623d0b6c5abff143e (diff)
TextEditor: Type over punctuation that can be auto completed
This restores a feature of older Qt Creator versions: typing "over" closing punctuation. For instance, if my cursor is at | and I have something like this: if (statement|) ... and I type the ) character, older versions of Qt Creator would not end up with )). With newer versions of Qt Creator, this behavior is limited to the case where an autocompletion has just happened (i.e. if I typed the opening ( character, the closing ) is auto inserted and highlighted - and if I type it myself, it won't add a second one). Task-number: QTCREATORBUG-16946 Change-Id: I45af3ac139d5e7c76e5f0a8a9d66762f9209a525 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/autocompleter.h')
-rw-r--r--src/plugins/texteditor/autocompleter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/texteditor/autocompleter.h b/src/plugins/texteditor/autocompleter.h
index 4847f50476..128d875e0f 100644
--- a/src/plugins/texteditor/autocompleter.h
+++ b/src/plugins/texteditor/autocompleter.h
@@ -53,6 +53,9 @@ public:
void setSurroundWithQuotesEnabled(bool b) { m_surroundWithQuotes = b; }
bool isSurroundWithQuotesEnabled() const { return m_surroundWithQuotes; }
+ void setOverwriteClosingCharsEnabled(bool b) { m_overwriteClosingChars = b; }
+ bool isOverwriteClosingCharsEnabled() const { return m_overwriteClosingChars; }
+
void setTabSettings(const TabSettings &tabSettings) { m_tabSettings = tabSettings; }
const TabSettings &tabSettings() const { return m_tabSettings; }
@@ -103,6 +106,7 @@ private:
bool m_surroundWithBrackets;
bool m_autoInsertQuotes;
bool m_surroundWithQuotes;
+ bool m_overwriteClosingChars;
};
} // TextEditor