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
4b7d826d
Commit
4b7d826d
authored
Nov 30, 2010
by
Christiaan Janssen
Browse files
QmlEngine: handling breakpoint insertions/removals
Reviewed-by: hjk
parent
0269e60b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/qml/qmlengine.cpp
View file @
4b7d826d
...
...
@@ -467,25 +467,33 @@ void QmlEngine::attemptBreakpointSynchronization()
handler
->
setEngine
(
id
,
this
);
}
//bool updateNeeded = false;
JSAgentBreakpoints
breakpoints
;
foreach
(
BreakpointId
id
,
handler
->
engineBreakpointIds
(
this
))
{
if
(
handler
->
state
(
id
)
==
BreakpointInsertRequested
)
handler
->
notifyBreakpointInsertProceeding
(
id
);
QString
processedFilename
=
handler
->
fileName
(
id
);
if
(
handler
->
state
(
id
)
==
BreakpointRemoveRequested
)
{
handler
->
notifyBreakpointRemoveProceeding
(
id
);
handler
->
notifyBreakpointRemoveOk
(
id
);
}
else
{
if
(
handler
->
state
(
id
)
==
BreakpointInsertRequested
)
{
handler
->
notifyBreakpointInsertProceeding
(
id
);
}
QString
processedFilename
=
handler
->
fileName
(
id
);
#ifdef Q_OS_MACX
// Qt Quick Applications by default copy the qml directory to buildDir()/X.app/Contents/Resources
const
QString
applicationBundleDir
=
QFileInfo
(
startParameters
().
executable
).
absolutePath
()
+
"/../.."
;
processedFilename
=
mangleFilenamePaths
(
handler
->
fileName
(
id
),
startParameters
().
projectDir
,
applicationBundleDir
+
"/Contents/Resources"
);
// Qt Quick Applications by default copy the qml directory to buildDir()/X.app/Contents/Resources
const
QString
applicationBundleDir
=
QFileInfo
(
startParameters
().
executable
).
absolutePath
()
+
"/../.."
;
processedFilename
=
mangleFilenamePaths
(
handler
->
fileName
(
id
),
startParameters
().
projectDir
,
applicationBundleDir
+
"/Contents/Resources"
);
#endif
if
(
isShadowBuildProject
())
processedFilename
=
toShadowBuildFilename
(
processedFilename
);
JSAgentBreakpointData
bp
;
bp
.
fileName
=
processedFilename
.
toUtf8
();
bp
.
lineNumber
=
handler
->
lineNumber
(
id
);
bp
.
functionName
=
handler
->
functionName
(
id
).
toUtf8
();
breakpoints
.
insert
(
bp
);
if
(
isShadowBuildProject
())
processedFilename
=
toShadowBuildFilename
(
processedFilename
);
JSAgentBreakpointData
bp
;
bp
.
fileName
=
processedFilename
.
toUtf8
();
bp
.
lineNumber
=
handler
->
lineNumber
(
id
);
bp
.
functionName
=
handler
->
functionName
(
id
).
toUtf8
();
breakpoints
.
insert
(
bp
);
if
(
handler
->
state
(
id
)
==
BreakpointInsertProceeding
)
{
handler
->
notifyBreakpointInsertOk
(
id
);
}
}
}
QByteArray
reply
;
...
...
@@ -714,7 +722,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
foreach
(
BreakpointId
id
,
handler
->
engineBreakpointIds
(
this
))
{
QString
processedFilename
=
handler
->
fileName
(
id
);
if
(
processedFilename
==
file
&&
handler
->
lineNumber
(
id
)
==
line
)
{
handler
->
notify
BreakpointInsert
Ok
(
id
);
QTC_ASSERT
(
handler
->
state
(
id
)
==
BreakpointInsert
ed
,
/**/
);
BreakpointResponse
br
=
handler
->
response
(
id
);
br
.
fileName
=
file
;
br
.
lineNumber
=
line
;
...
...
Write
Preview
Markdown
is supported
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