Commit 0e351513 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed spelling of method name

parent 19f4466e
...@@ -1268,7 +1268,7 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const ...@@ -1268,7 +1268,7 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const
return false; return false;
} }
bool CPPEditor::contextAllowsAutoParenthesis(const QTextCursor &cursor) const bool CPPEditor::contextAllowsAutoParentheses(const QTextCursor &cursor) const
{ {
CPlusPlus::TokenUnderCursor tokenUnderCursor; CPlusPlus::TokenUnderCursor tokenUnderCursor;
const SimpleToken tk = tokenUnderCursor(cursor); const SimpleToken tk = tokenUnderCursor(cursor);
......
...@@ -213,7 +213,7 @@ protected: ...@@ -213,7 +213,7 @@ protected:
// These override BaseTextEditor // These override BaseTextEditor
bool isElectricCharacter(const QChar &ch) const; bool isElectricCharacter(const QChar &ch) const;
bool contextAllowsAutoParenthesis(const QTextCursor &cursor) const; bool contextAllowsAutoParentheses(const QTextCursor &cursor) const;
private Q_SLOTS: private Q_SLOTS:
void updateFileName(); void updateFileName();
......
...@@ -1121,10 +1121,10 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e) ...@@ -1121,10 +1121,10 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
if (!electricChar.isNull()) if (!electricChar.isNull())
cursor.beginEditBlock(); cursor.beginEditBlock();
bool insertAutoParenthesis = !autoText.isEmpty() && contextAllowsAutoParenthesis(cursor); bool insertAutoParentheses = !autoText.isEmpty() && contextAllowsAutoParentheses(cursor);
cursor.insertText(text); cursor.insertText(text);
if (insertAutoParenthesis) { if (insertAutoParentheses) {
int pos = cursor.position(); int pos = cursor.position();
cursor.insertText(autoText); cursor.insertText(autoText);
cursor.setPosition(pos); cursor.setPosition(pos);
...@@ -3329,7 +3329,7 @@ bool BaseTextEditor::isElectricCharacter(const QChar &) const ...@@ -3329,7 +3329,7 @@ bool BaseTextEditor::isElectricCharacter(const QChar &) const
return false; return false;
} }
bool BaseTextEditor::contextAllowsAutoParenthesis(const QTextCursor &) const bool BaseTextEditor::contextAllowsAutoParentheses(const QTextCursor &) const
{ {
return true; return true;
} }
......
...@@ -509,7 +509,7 @@ protected: ...@@ -509,7 +509,7 @@ protected:
// Returns true if key triggers an indent. // Returns true if key triggers an indent.
virtual bool isElectricCharacter(const QChar &ch) const; virtual bool isElectricCharacter(const QChar &ch) const;
// Returns true if automatic brace matching should be enabled in the context of the given cursor // Returns true if automatic brace matching should be enabled in the context of the given cursor
virtual bool contextAllowsAutoParenthesis(const QTextCursor &cursor) const; virtual bool contextAllowsAutoParentheses(const QTextCursor &cursor) const;
// Indent a text block based on previous line. Default does nothing // Indent a text block based on previous line. Default does nothing
virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar); virtual void indentBlock(QTextDocument *doc, QTextBlock block, QChar typedChar);
// Indent at cursor. Calls indentBlock for selection or current line. // Indent at cursor. Calls indentBlock for selection or current line.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment