diff options
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggerbackend.cpp | 10 | ||||
-rw-r--r-- | tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp index c7577d6..7f4211c 100644 --- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp +++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp @@ -417,12 +417,10 @@ void QScriptDebuggerBackend::attachTo(QScriptEngine *engine) // global.setProperty(QString::fromLatin1("qAssert"), assertFunction()); d->origFileNameFunction = global.property(QString::fromLatin1("__FILE__")); global.setProperty(QString::fromLatin1("__FILE__"), fileNameFunction(), - QScriptValue::PropertyGetter | QScriptValue::PropertySetter - | QScriptValue::ReadOnly); + QScriptValue::PropertyGetter | QScriptValue::ReadOnly); d->origLineNumberFunction = global.property(QString::fromLatin1("__LINE__")); global.setProperty(QString::fromLatin1("__LINE__"), lineNumberFunction(), - QScriptValue::PropertyGetter | QScriptValue::PropertySetter - | QScriptValue::ReadOnly); + QScriptValue::PropertyGetter | QScriptValue::ReadOnly); engine->setAgent(d->agent); } @@ -444,8 +442,12 @@ void QScriptDebuggerBackend::detach() global.setProperty(QString::fromLatin1("print"), d->origTraceFunction); d->origTraceFunction = QScriptValue(); // global.setProperty(QString::fromLatin1("qAssert"), QScriptValue()); + global.setProperty(QString::fromLatin1("__FILE__"), QScriptValue(), + QScriptValue::PropertyGetter); global.setProperty(QString::fromLatin1("__FILE__"), d->origFileNameFunction); d->origFileNameFunction = QScriptValue(); + global.setProperty(QString::fromLatin1("__LINE__"), QScriptValue(), + QScriptValue::PropertyGetter); global.setProperty(QString::fromLatin1("__LINE__"), d->origLineNumberFunction); d->origLineNumberFunction = QScriptValue(); d->agent->nullifyBackendPointer(); diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp index 5e5b701..cbdaf1e 100644 --- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp +++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp @@ -131,11 +131,9 @@ void tst_QScriptEngineDebugger::attachAndDetach() QVERIFY(!engine.globalObject().property("print").strictlyEquals(oldPrint)); debugger.detach(); - QEXPECT_FAIL("", "Task 256184", Continue); - QVERIFY(!engine.globalObject().property("print").isValid()); - QEXPECT_FAIL("", "Task 256184", Continue); + QVERIFY(engine.globalObject().property("print").strictlyEquals(oldPrint)); QVERIFY(!engine.globalObject().property("__FILE__").isValid()); -// QVERIFY(!engine.globalObject().property("__LINE__").isValid()); + QVERIFY(!engine.globalObject().property("__LINE__").isValid()); } { QScriptEngineDebugger debugger; |