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
7edb110e
Commit
7edb110e
authored
15 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Check for valid paths
Reviewed-By:
Christian Kamm
<
christian.d.kamm@nokia.com
>
parent
6de52c40
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/cppeditor/cppquickfix.cpp
+2
-4
2 additions, 4 deletions
src/plugins/cppeditor/cppquickfix.cpp
with
2 additions
and
4 deletions
src/plugins/cppeditor/cppquickfix.cpp
+
2
−
4
View file @
7edb110e
...
@@ -275,9 +275,6 @@ public:
...
@@ -275,9 +275,6 @@ public:
virtual
int
match
(
const
QList
<
AST
*>
&
path
)
virtual
int
match
(
const
QList
<
AST
*>
&
path
)
{
{
if
(
path
.
size
()
==
0
)
return
-
1
;
// show when we're on the 'if' of an if statement
// show when we're on the 'if' of an if statement
int
index
=
path
.
size
()
-
1
;
int
index
=
path
.
size
()
-
1
;
IfStatementAST
*
ifStatement
=
path
.
at
(
index
)
->
asIfStatement
();
IfStatementAST
*
ifStatement
=
path
.
at
(
index
)
->
asIfStatement
();
...
@@ -805,7 +802,8 @@ int CPPQuickFixCollector::startCompletion(TextEditor::ITextEditable *editable)
...
@@ -805,7 +802,8 @@ int CPPQuickFixCollector::startCompletion(TextEditor::ITextEditable *editable)
ASTPath
astPath
(
info
.
doc
);
ASTPath
astPath
(
info
.
doc
);
const
QList
<
AST
*>
path
=
astPath
(
_editor
->
textCursor
());
const
QList
<
AST
*>
path
=
astPath
(
_editor
->
textCursor
());
// ### build the list of the quick fix ops by scanning path.
if
(
path
.
isEmpty
())
return
-
1
;
QSharedPointer
<
RewriteLogicalAndOp
>
rewriteLogicalAndOp
(
new
RewriteLogicalAndOp
(
info
.
doc
,
info
.
snapshot
,
_editor
));
QSharedPointer
<
RewriteLogicalAndOp
>
rewriteLogicalAndOp
(
new
RewriteLogicalAndOp
(
info
.
doc
,
info
.
snapshot
,
_editor
));
QSharedPointer
<
SplitIfStatementOp
>
splitIfStatementOp
(
new
SplitIfStatementOp
(
info
.
doc
,
info
.
snapshot
,
_editor
));
QSharedPointer
<
SplitIfStatementOp
>
splitIfStatementOp
(
new
SplitIfStatementOp
(
info
.
doc
,
info
.
snapshot
,
_editor
));
...
...
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