aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-08-08 16:26:12 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-08-09 13:40:20 +0200
commit342abadf362850ccdc7c2ca11f27e45d0513cefc (patch)
tree8539ec2863ec7610f7170dc409f49a61d8a4ae05
parent15849179856eb2aa4af8056dbc3b8a4494ce1e87 (diff)
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>
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
index 80c7d29df6..8c0ebf370a 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
@@ -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;