Skip to content
GitLab
Menu
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
081e31fc
Commit
081e31fc
authored
Sep 03, 2010
by
Roberto Raggi
Browse files
Check for 0x0 pointers.
parent
b9c56431
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppquickfixes.cpp
View file @
081e31fc
...
@@ -1340,15 +1340,18 @@ protected:
...
@@ -1340,15 +1340,18 @@ protected:
scope
);
scope
);
foreach
(
LookupItem
result
,
results
)
{
foreach
(
LookupItem
result
,
results
)
{
FullySpecifiedType
fst
=
result
.
type
();
FullySpecifiedType
fst
=
result
.
type
();
if
(
!
result
.
declaration
())
continue
;
if
(
Enum
*
e
=
result
.
declaration
()
->
type
()
->
asEnumType
())
if
(
Enum
*
e
=
result
.
declaration
()
->
type
()
->
asEnumType
())
return
e
;
return
e
;
if
(
NamedType
*
namedType
=
fst
->
asNamedType
())
{
if
(
NamedType
*
namedType
=
fst
->
asNamedType
())
{
QList
<
LookupItem
>
candidates
=
QList
<
LookupItem
>
candidates
=
typeOfExpression
.
context
().
lookup
(
namedType
->
name
(),
scope
);
typeOfExpression
.
context
().
lookup
(
namedType
->
name
(),
scope
);
foreach
(
const
LookupItem
&
r
,
candidates
)
{
foreach
(
const
LookupItem
&
r
,
candidates
)
{
Symbol
*
candidate
=
r
.
declaration
();
if
(
Symbol
*
candidate
=
r
.
declaration
())
{
if
(
Enum
*
e
=
candidate
->
asEnum
())
{
if
(
Enum
*
e
=
candidate
->
asEnum
())
{
return
e
;
return
e
;
}
}
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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