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
42abd8b1
Commit
42abd8b1
authored
Jul 13, 2010
by
Olivier Goffart
Browse files
QmlJS::Delta: fix crash if a document does not have a qmlProgram
parent
d89f4770
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmljsinspector/qmljsdelta.cpp
View file @
42abd8b1
...
...
@@ -246,8 +246,11 @@ static QString _methodName(UiSourceElement *source)
Delta
::
DebugIdMap
Delta
::
operator
()(
Document
::
Ptr
doc1
,
Document
::
Ptr
doc2
,
const
DebugIdMap
&
debugIds
)
Delta
::
DebugIdMap
Delta
::
operator
()(
const
Document
::
Ptr
&
doc1
,
const
Document
::
Ptr
&
doc2
,
const
DebugIdMap
&
debugIds
)
{
Q_ASSERT
(
doc1
->
qmlProgram
());
Q_ASSERT
(
doc2
->
qmlProgram
());
QHash
<
UiObjectMember
*
,
QList
<
QDeclarativeDebugObjectReference
>
>
newDebuggIds
;
Map
M
=
Mapping
(
doc1
,
doc2
);
...
...
src/plugins/qmljsinspector/qmljsdelta.h
View file @
42abd8b1
...
...
@@ -56,7 +56,7 @@ public:
public:
typedef
QHash
<
UiObjectMember
*
,
QList
<
QDeclarativeDebugObjectReference
>
>
DebugIdMap
;
DebugIdMap
operator
()(
Document
::
Ptr
doc1
,
Document
::
Ptr
doc2
,
const
DebugIdMap
&
debugIds
);
DebugIdMap
operator
()(
const
QmlJS
::
Document
::
Ptr
&
doc1
,
const
QmlJS
::
Document
::
Ptr
&
doc2
,
const
DebugIdMap
&
debugIds
);
QList
<
Change
>
changes
()
const
;
...
...
src/plugins/qmljsinspector/qmljslivetextpreview.cpp
View file @
42abd8b1
...
...
@@ -140,7 +140,7 @@ void QmlJSLiveTextPreview::documentChanged(QmlJS::Document::Ptr doc)
if
(
!
core
->
hasContext
(
dbgcontext
))
return
;
if
(
doc
&&
m_previousDoc
&&
doc
->
fileName
()
==
m_previousDoc
->
fileName
())
{
if
(
doc
&&
m_previousDoc
&&
doc
->
fileName
()
==
m_previousDoc
->
fileName
()
&&
doc
->
qmlProgram
()
&&
m_previousDoc
->
qmlProgram
()
)
{
if
(
m_debugIds
.
isEmpty
())
m_debugIds
=
m_initialTable
.
value
(
doc
->
fileName
());
Delta
delta
;
...
...
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