aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeautocompleter.h
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2016-06-10 15:13:38 +0200
committerDavid Schulz <david.schulz@theqtcompany.com>2016-06-21 11:56:56 +0000
commit675060724453fc2a5d12431b656fdbb599e529f6 (patch)
treecbf5a1fc06919089d4028bd31c6ae7e15ee575b6 /src/plugins/cmakeprojectmanager/cmakeautocompleter.h
parent08dcad9c829abfbc592d6a4628d091d942a87c0f (diff)
Editor: Skip auto completed character only if it was recently inserted.
This means you can skip automatically inserted characters as long as you don't explicitly move the text cursor and the editor doesn't lose the focus. This will be visualized by highlighting the automatically inserted character as long as you can perform the skipping. This will reduce unexpected skipping in the case a cursor was explicitly placed before an closing brace and a closing brace is typed. Change-Id: I28e29e79ba10c9c48e8bc8817405fea630cca9bd Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeautocompleter.h')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeautocompleter.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h
index dee6655d94..ded51afc45 100644
--- a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h
+++ b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h
@@ -40,9 +40,9 @@ public:
bool isInComment(const QTextCursor &cursor) const override;
bool isInString(const QTextCursor &cursor) const override;
QString insertMatchingBrace(const QTextCursor &cursor, const QString &text,
- QChar lookAhead, int *skippedChars) const override;
+ QChar lookAhead, bool skipChars, int *skippedChars) const override;
QString insertMatchingQuote(const QTextCursor &cursor, const QString &text,
- QChar lookAhead, int *skippedChars) const override;
+ QChar lookAhead, bool skipChars, int *skippedChars) const override;
int paragraphSeparatorAboutToBeInserted(QTextCursor &cursor, const TextEditor::TabSettings &tabSettings) override;
bool contextAllowsAutoBrackets(const QTextCursor &cursor, const QString &textToInsert) const override;
bool contextAllowsAutoQuotes(const QTextCursor &cursor, const QString &textToInsert) const override;