summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativedebughelper
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativedebughelper')
-rw-r--r--tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h4
-rw-r--r--tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp7
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h
index bbee22858f..5d02895926 100644
--- a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h
+++ b/tests/auto/declarative/qdeclarativedebughelper/private_headers/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/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp
index ac5c74940a..90c4443215 100644
--- a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp
+++ b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp
@@ -54,6 +54,7 @@ class tst_qdeclarativedebughelper : public QObject {
private slots:
void getScriptEngine();
void setAnimationSlowDownFactor();
+ void enableDebugging();
};
class TestAnimation : public QAbstractAnimation {
@@ -109,6 +110,12 @@ void tst_qdeclarativedebughelper::setAnimationSlowDownFactor()
QVERIFY(animation.updateCalled > 1);
}
+void tst_qdeclarativedebughelper::enableDebugging()
+{
+ QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!");
+ QDeclarativeDebugHelper::enableDebugging();
+}
+
QTEST_MAIN(tst_qdeclarativedebughelper)
#include "tst_qdeclarativedebughelper.moc"