diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-17 15:42:01 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-17 15:44:46 +0200 |
commit | 67d40ba7225dd38ba1e21ff6317920ce9fd5ee75 (patch) | |
tree | fb2ea0bf0bde6fb2bba9c0941b3bb5d92c7cb0a9 /src/scripttools | |
parent | 5af2e06cb543bd27450c29a1fca8686413f1cceb (diff) | |
download | qt4-tools-67d40ba7225dd38ba1e21ff6317920ce9fd5ee75.tar.gz |
make sure __FILE__ and __LINE__ properties are restored correctly
Task-number: 256184
Diffstat (limited to 'src/scripttools')
-rw-r--r-- | src/scripttools/debugging/qscriptdebuggerbackend.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp index c7577d6261..7f4211c3a1 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(); |