Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
0e351513
Commit
0e351513
authored
Sep 16, 2009
by
Thorbjørn Lindeijer
Browse files
Fixed spelling of method name
parent
19f4466e
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
0e351513
...
...
@@ -1268,7 +1268,7 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const
return
false
;
}
bool
CPPEditor
::
contextAllowsAutoParenthes
i
s
(
const
QTextCursor
&
cursor
)
const
bool
CPPEditor
::
contextAllowsAutoParenthes
e
s
(
const
QTextCursor
&
cursor
)
const
{
CPlusPlus
::
TokenUnderCursor
tokenUnderCursor
;
const
SimpleToken
tk
=
tokenUnderCursor
(
cursor
);
...
...
src/plugins/cppeditor/cppeditor.h
View file @
0e351513
...
...
@@ -213,7 +213,7 @@ protected:
// These override BaseTextEditor
bool
isElectricCharacter
(
const
QChar
&
ch
)
const
;
bool
contextAllowsAutoParenthes
i
s
(
const
QTextCursor
&
cursor
)
const
;
bool
contextAllowsAutoParenthes
e
s
(
const
QTextCursor
&
cursor
)
const
;
private
Q_SLOTS
:
void
updateFileName
();
...
...
src/plugins/texteditor/basetexteditor.cpp
View file @
0e351513
...
...
@@ -1121,10 +1121,10 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e)
if
(
!
electricChar
.
isNull
())
cursor
.
beginEditBlock
();
bool
insertAutoParenthes
i
s
=
!
autoText
.
isEmpty
()
&&
contextAllowsAutoParenthes
i
s
(
cursor
);
bool
insertAutoParenthes
e
s
=
!
autoText
.
isEmpty
()
&&
contextAllowsAutoParenthes
e
s
(
cursor
);
cursor
.
insertText
(
text
);
if
(
insertAutoParenthes
i
s
)
{
if
(
insertAutoParenthes
e
s
)
{
int
pos
=
cursor
.
position
();
cursor
.
insertText
(
autoText
);
cursor
.
setPosition
(
pos
);
...
...
@@ -3329,7 +3329,7 @@ bool BaseTextEditor::isElectricCharacter(const QChar &) const
return
false
;
}
bool
BaseTextEditor
::
contextAllowsAutoParenthes
i
s
(
const
QTextCursor
&
)
const
bool
BaseTextEditor
::
contextAllowsAutoParenthes
e
s
(
const
QTextCursor
&
)
const
{
return
true
;
}
...
...
src/plugins/texteditor/basetexteditor.h
View file @
0e351513
...
...
@@ -509,7 +509,7 @@ protected:
// Returns true if key triggers an indent.
virtual
bool
isElectricCharacter
(
const
QChar
&
ch
)
const
;
// Returns true if automatic brace matching should be enabled in the context of the given cursor
virtual
bool
contextAllowsAutoParenthes
i
s
(
const
QTextCursor
&
cursor
)
const
;
virtual
bool
contextAllowsAutoParenthes
e
s
(
const
QTextCursor
&
cursor
)
const
;
// Indent a text block based on previous line. Default does nothing
virtual
void
indentBlock
(
QTextDocument
*
doc
,
QTextBlock
block
,
QChar
typedChar
);
// Indent at cursor. Calls indentBlock for selection or current line.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment