diff --git a/src/tools/qml/qmlobserver/qmlruntime.cpp b/src/tools/qml/qmlobserver/qmlruntime.cpp
index 646f438869aa913afad2f70c2ad3be19a55b39c4..52cbcd9d0303668cb96dba37dabb60c46485c63b 100644
--- a/src/tools/qml/qmlobserver/qmlruntime.cpp
+++ b/src/tools/qml/qmlobserver/qmlruntime.cpp
@@ -657,6 +657,7 @@ void QDeclarativeViewer::setDesignModeBehavior(bool value)
 
 void QDeclarativeViewer::setDebugMode(bool on)
 {
+    Q_UNUSED(on);
     //if (on)
     {
         new JSDebuggerAgent(QDeclarativeEnginePrivate::getScriptEngine(canvas->engine()));