forked from qt-creator/qt-creator
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/2753 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user