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
Tobias Hunger
qt-creator
Commits
32bb7bff
Commit
32bb7bff
authored
Aug 30, 2010
by
Christian Kamm
Browse files
QmlJS: Add missing null checks before using scopeChain().qmlTypes.
parent
bfad59df
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljscheck.cpp
View file @
32bb7bff
...
...
@@ -309,7 +309,8 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
bool
isAttachedProperty
=
false
;
if
(
!
propertyName
.
isEmpty
()
&&
propertyName
[
0
].
isUpper
())
{
isAttachedProperty
=
true
;
scopeObjects
+=
_context
.
scopeChain
().
qmlTypes
;
if
(
const
ObjectValue
*
qmlTypes
=
_context
.
scopeChain
().
qmlTypes
)
scopeObjects
+=
qmlTypes
;
}
if
(
scopeObjects
.
isEmpty
())
...
...
src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
View file @
32bb7bff
...
...
@@ -256,7 +256,8 @@ public:
bool
isAttachedProperty
=
false
;
if
(
!
propertyName
.
isEmpty
()
&&
propertyName
[
0
].
isUpper
())
{
isAttachedProperty
=
true
;
scopeObjects
+=
m_context
->
scopeChain
().
qmlTypes
;
if
(
const
Interpreter
::
ObjectValue
*
qmlTypes
=
m_context
->
scopeChain
().
qmlTypes
)
scopeObjects
+=
qmlTypes
;
}
if
(
scopeObjects
.
isEmpty
())
...
...
src/plugins/qmljseditor/qmljscodecompletion.cpp
View file @
32bb7bff
...
...
@@ -730,7 +730,8 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
m_completions
.
append
(
idPropertyCompletion
);
addCompletionsPropertyLhs
(
enumerateProperties
(
qmlScopeType
),
symbolIcon
,
PropertyOrder
);
addCompletions
(
enumerateProperties
(
context
->
scopeChain
().
qmlTypes
),
symbolIcon
,
TypeOrder
);
if
(
const
Interpreter
::
ObjectValue
*
qmlTypes
=
context
->
scopeChain
().
qmlTypes
)
addCompletions
(
enumerateProperties
(
qmlTypes
),
symbolIcon
,
TypeOrder
);
if
(
ScopeBuilder
::
isPropertyChangesObject
(
context
,
qmlScopeType
)
&&
context
->
scopeChain
().
qmlScopeObjects
.
size
()
==
2
)
{
...
...
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