Commit 342abadf authored by Kai Koehne's avatar Kai Koehne

QmlDebugger: Hit breakpoints for simple bindings also for .qmlproject

Make sure QML_DISABLE_OPTIMIZER is set also when debugging with
qmlobserver

Change-Id: I33aa4cd50ae184e339e3783488ba236eecdf7b33
Reviewed-on: http://codereview.qt.nokia.com/2753Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent 15849179
......@@ -207,6 +207,13 @@ RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConf
params.projectSourceDirectory = runConfig->target()->project()->projectDirectory();
params.projectSourceFiles = runConfig->target()->project()->files(Project::ExcludeGeneratedFiles);
// Makes sure that all bindings go through the JavaScript engine, so that
// breakpoints are actually hit!
const QString optimizerKey = QLatin1String("QML_DISABLE_OPTIMIZER");
if (!params.environment.hasKey(optimizerKey)) {
params.environment.set(optimizerKey, QLatin1String("1"));
}
if (params.executable.isEmpty()) {
QmlProjectPlugin::showQmlObserverToolWarning();
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment