diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-07-17 12:41:37 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-07-20 12:35:10 +0000 |
commit | c8a543b949bd86540ccd6e05d421ee90735211fb (patch) | |
tree | 3b5bb007dc30af2a7768c7dc83f874204512fb8b /src/plugins/cmakeprojectmanager | |
parent | f77dfd64d5052d783d5a43e171eeba91998f1148 (diff) | |
download | qt-creator-c8a543b949bd86540ccd6e05d421ee90735211fb.tar.gz |
TextEditor: Make TabSettings accessible for AutoCompleters
Change-Id: I3591ad94ca98979c2d47585d33800a489d87eeda
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp | 4 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeautocompleter.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp b/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp index 8c2a0ba0a1..eca893b8ea 100644 --- a/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeautocompleter.cpp @@ -117,11 +117,11 @@ QString CMakeAutoCompleter::insertMatchingQuote(const QTextCursor &cursor, return quote; } -int CMakeAutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor, const TextEditor::TabSettings &tabSettings) +int CMakeAutoCompleter::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor) { const QString line = cursor.block().text().trimmed(); if (line.contains(QRegExp(QStringLiteral("^(endfunction|endmacro|endif|endforeach|endwhile)\\w*\\(")))) - tabSettings.indentLine(cursor.block(), tabSettings.indentationColumn(cursor.block().text())); + tabSettings().indentLine(cursor.block(), tabSettings().indentationColumn(cursor.block().text())); return 0; } diff --git a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h index ded51afc45..f61774fe23 100644 --- a/src/plugins/cmakeprojectmanager/cmakeautocompleter.h +++ b/src/plugins/cmakeprojectmanager/cmakeautocompleter.h @@ -43,7 +43,7 @@ public: QChar lookAhead, bool skipChars, int *skippedChars) const override; QString insertMatchingQuote(const QTextCursor &cursor, const QString &text, QChar lookAhead, bool skipChars, int *skippedChars) const override; - int paragraphSeparatorAboutToBeInserted(QTextCursor &cursor, const TextEditor::TabSettings &tabSettings) override; + int paragraphSeparatorAboutToBeInserted(QTextCursor &cursor) override; bool contextAllowsAutoBrackets(const QTextCursor &cursor, const QString &textToInsert) const override; bool contextAllowsAutoQuotes(const QTextCursor &cursor, const QString &textToInsert) const override; bool contextAllowsElectricCharacters(const QTextCursor &cursor) const override; |