Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
29f03c75
Commit
29f03c75
authored
16 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Removed obsolete code.
parent
42c676d1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/cppeditor/cppeditor.cpp
+0
-62
0 additions, 62 deletions
src/plugins/cppeditor/cppeditor.cpp
with
0 additions
and
62 deletions
src/plugins/cppeditor/cppeditor.cpp
+
0
−
62
View file @
29f03c75
...
@@ -1271,7 +1271,6 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const
...
@@ -1271,7 +1271,6 @@ bool CPPEditor::isElectricCharacter(const QChar &ch) const
return
false
;
return
false
;
}
}
#if 1
QString
CPPEditor
::
autoComplete
(
QTextCursor
&
cursor
,
const
QString
&
textToInsert
)
const
QString
CPPEditor
::
autoComplete
(
QTextCursor
&
cursor
,
const
QString
&
textToInsert
)
const
{
{
bool
checkBlockEnd
=
m_allowSkippingOfBlockEnd
;
bool
checkBlockEnd
=
m_allowSkippingOfBlockEnd
;
...
@@ -1302,67 +1301,6 @@ QString CPPEditor::autoComplete(QTextCursor &cursor, const QString &textToInsert
...
@@ -1302,67 +1301,6 @@ QString CPPEditor::autoComplete(QTextCursor &cursor, const QString &textToInsert
return
autoText
;
return
autoText
;
}
}
#else
QString
CPPEditor
::
autoComplete
(
QTextCursor
&
cursor
,
const
QString
&
text
)
const
{
bool
checkBlockEnd
=
m_allowSkippingOfBlockEnd
;
m_allowSkippingOfBlockEnd
=
false
;
if
(
!
contextAllowsAutoParentheses
(
cursor
))
return
QString
();
QString
autoText
;
QChar
lookAhead
=
characterAt
(
cursor
.
selectionEnd
());
if
(
lookAhead
.
isSpace
()
// Only auto-insert when the text right of the cursor seems unrelated
||
lookAhead
==
QLatin1Char
(
'{'
)
||
lookAhead
==
QLatin1Char
(
'}'
)
||
lookAhead
==
QLatin1Char
(
']'
)
||
lookAhead
==
QLatin1Char
(
')'
)
||
lookAhead
==
QLatin1Char
(
';'
)
||
lookAhead
==
QLatin1Char
(
','
)
)
{
foreach
(
QChar
c
,
text
)
{
QChar
close
;
if
(
c
==
QLatin1Char
(
'('
))
{
close
=
QLatin1Char
(
')'
);
}
else
if
(
c
==
QLatin1Char
(
'['
))
close
=
QLatin1Char
(
']'
);
else
if
(
c
==
QLatin1Char
(
'\"'
))
close
=
c
;
else
if
(
c
==
QLatin1Char
(
'\''
))
close
=
c
;
if
(
!
close
.
isNull
())
autoText
+=
close
;
}
}
bool
skip
=
false
;
QChar
first
=
text
.
at
(
0
);
if
(
first
==
QLatin1Char
(
')'
)
||
first
==
QLatin1Char
(
']'
)
||
first
==
QLatin1Char
(
';'
)
)
{
skip
=
(
first
==
lookAhead
);
}
else
if
(
first
==
QLatin1Char
(
'\"'
)
||
first
==
QLatin1Char
(
'\''
))
{
if
(
first
==
lookAhead
)
{
QChar
lookBehind
=
characterAt
(
cursor
.
position
()
-
1
);
skip
=
(
lookBehind
!=
'\\'
);
}
}
else
if
(
checkBlockEnd
&&
first
==
QLatin1Char
(
'}'
)
&&
lookAhead
==
QChar
::
ParagraphSeparator
)
{
skip
=
(
first
==
characterAt
(
cursor
.
position
()
+
1
));
cursor
.
movePosition
(
QTextCursor
::
Right
);
}
if
(
skip
)
{
int
pos
=
cursor
.
position
();
cursor
.
setPosition
(
pos
+
1
);
cursor
.
setPosition
(
pos
,
QTextCursor
::
KeepAnchor
);
}
return
autoText
;
}
#endif
bool
CPPEditor
::
autoBackspace
(
QTextCursor
&
cursor
)
bool
CPPEditor
::
autoBackspace
(
QTextCursor
&
cursor
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment