diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-14 04:00:21 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-14 04:00:21 (GMT) |
commit | 17a5c63a499b10036dc14135457ec22c89270f9a (patch) | |
tree | 38d3606d447631f3c0a861c25a128088c9b0c4be /src/declarative/qml/qdeclarativeinclude.cpp | |
parent | 677d06cecb44c482c72d1e987e3f923a73fcedd2 (diff) | |
download | Qt-17a5c63a499b10036dc14135457ec22c89270f9a.zip Qt-17a5c63a499b10036dc14135457ec22c89270f9a.tar.gz Qt-17a5c63a499b10036dc14135457ec22c89270f9a.tar.bz2 |
Missing files from 645b9ee9dd6e0576542cc61872ecedb408ca8a89
Grrr
Diffstat (limited to 'src/declarative/qml/qdeclarativeinclude.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeinclude.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativeinclude.cpp b/src/declarative/qml/qdeclarativeinclude.cpp index 97af5b5..b886935 100644 --- a/src/declarative/qml/qdeclarativeinclude.cpp +++ b/src/declarative/qml/qdeclarativeinclude.cpp @@ -76,8 +76,7 @@ QDeclarativeInclude::QDeclarativeInclude(const QUrl &url, QDeclarativeInclude::~QDeclarativeInclude() { - if (m_reply) - delete m_reply; + delete m_reply; } QScriptValue QDeclarativeInclude::resultValue(QScriptEngine *engine, Status status) @@ -116,7 +115,7 @@ void QDeclarativeInclude::finished() QVariant redirect = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute); if (redirect.isValid()) { m_url = m_url.resolved(redirect.toUrl()); - delete m_reply; + delete m_reply; QNetworkRequest request; request.setUrl(m_url); @@ -149,6 +148,7 @@ void QDeclarativeInclude::finished() if (m_scriptEngine->hasUncaughtException()) { m_result.setProperty(QLatin1String("status"), QScriptValue(m_scriptEngine, Exception)); m_result.setProperty(QLatin1String("exception"), m_scriptEngine->uncaughtException()); + m_scriptEngine->clearExceptions(); } else { m_result.setProperty(QLatin1String("status"), QScriptValue(m_scriptEngine, Ok)); } @@ -158,7 +158,8 @@ void QDeclarativeInclude::finished() callback(m_scriptEngine, m_callback, m_result); - delete this; + disconnect(); + deleteLater(); } void QDeclarativeInclude::callback(QScriptEngine *engine, QScriptValue &callback, QScriptValue &status) @@ -237,6 +238,7 @@ QScriptValue QDeclarativeInclude::include(QScriptContext *ctxt, QScriptEngine *e if (engine->hasUncaughtException()) { result = resultValue(engine, Exception); result.setProperty(QLatin1String("exception"), engine->uncaughtException()); + engine->clearExceptions(); } else { result = resultValue(engine, Ok); } |