summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper.cpp8
-rw-r--r--src/declarative/debugger/qdeclarativedebughelper_p.h4
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp7
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp1
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def2
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def1
7 files changed, 24 insertions, 1 deletions
diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp
index 24cad35..d6d6e59 100644
--- a/src/declarative/debugger/qdeclarativedebughelper.cpp
+++ b/src/declarative/debugger/qdeclarativedebughelper.cpp
@@ -48,6 +48,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qabstractanimation_p.h>
+#include <private/qdeclarativeengine_p.h>
QT_BEGIN_NAMESPACE
@@ -63,4 +64,11 @@ void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor)
timer->setSlowdownFactor(factor);
}
+void QDeclarativeDebugHelper::enableDebugging() {
+ if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
+ qWarning("Qml debugging is enabled. Only use this in a safe environment!");
+ }
+ QDeclarativeEnginePrivate::qml_debugging_enabled = true;
+}
+
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h
index bbee228..5d02895 100644
--- a/src/declarative/debugger/qdeclarativedebughelper_p.h
+++ b/src/declarative/debugger/qdeclarativedebughelper_p.h
@@ -58,6 +58,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper
public:
static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine);
static void setAnimationSlowDownFactor(qreal factor);
+
+ // Enables remote debugging functionality
+ // Only use this for debugging in a safe environment!
+ static void enableDebugging();
};
QT_END_NAMESPACE
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index 66009f6..50c0713 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -42,6 +42,7 @@
#include "private/qdeclarativedebugservice_p.h"
#include "private/qpacketprotocol_p.h"
+#include "private/qdeclarativeengine_p.h"
#include <QtCore/qdebug.h>
#include <QtNetwork/qtcpserver.h>
@@ -205,6 +206,12 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
// format: qmljsdebugger=port:3768[,block]
if (!appD->qmljsDebugArgumentsString().isEmpty()) {
+ if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
+ qWarning() << QString::fromLatin1("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+ "Debugging has not been enabled.").arg(
+ appD->qmljsDebugArgumentsString()).toAscii().constData();
+ return 0;
+ }
if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) {
int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(','));
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index b87ba52..754e035 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -174,6 +174,7 @@ struct StaticQtMetaObject : public QObject
};
static bool qt_QmlQtModule_registered = false;
+bool QDeclarativeEnginePrivate::qml_debugging_enabled = false;
void QDeclarativeEnginePrivate::defineModule()
{
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index cac8f20..6d0c2b8 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -322,6 +322,8 @@ public:
static QString urlToLocalFileOrQrc(const QUrl& url);
static void defineModule();
+
+ static bool qml_debugging_enabled;
};
/*!
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 581c3b8..8f878b1 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -1838,4 +1838,4 @@ EXPORTS
?addChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1837 NONAME ; void QDeclarativeBasePositioner::addChanged(void)
?start@QDeclarativeAbstractAnimation@@QAEXXZ @ 1838 NONAME ; void QDeclarativeAbstractAnimation::start(void)
?qt_metacall@QDeclarativeAbstractAnimation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1839 NONAME ; int QDeclarativeAbstractAnimation::qt_metacall(enum QMetaObject::Call, int, void * *)
-
+ ?enableDebugging@QDeclarativeDebugHelper@@SAXXZ @ 1840 NONAME ; void QDeclarativeDebugHelper::enableDebugging(void)
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index b3bb7f5..eb540f8 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -1883,4 +1883,5 @@ EXPORTS
_ZThn8_N29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1882 NONAME
_ZThn8_N29QDeclarativeAbstractAnimationD0Ev @ 1883 NONAME
_ZThn8_N29QDeclarativeAbstractAnimationD1Ev @ 1884 NONAME
+ _ZN23QDeclarativeDebugHelper15enableDebuggingEv @ 1885 NONAME