summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsdocument.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-16 14:11:30 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-18 17:11:59 +0200
commitf725c24c561ea6d149736620af190cc10eea95e8 (patch)
treef36a08cecaab77bdf5aa96d0a69c0a0215303c8e /src/libs/qmljs/qmljsdocument.cpp
parentede672c8d9a997d8bb395d18c0eb829d99a56f16 (diff)
downloadqt-creator-f725c24c561ea6d149736620af190cc10eea95e8.tar.gz
QmlJS: Fix semantic and non-semantic QML error reporting.
The QML snapshot only ever contains valid Documents; to compile a list of parser problems we need to get at the invalid documents. To do that, the model manager now provides a Snapshot with up to date, but potentially invalid documents. That should also be useful for other things. Change-Id: I67892f63771c221bf2fe2c2bf0240a0f4e523227 Reviewed-on: http://codereview.qt.nokia.com/3012 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljsdocument.cpp')
-rw-r--r--src/libs/qmljs/qmljsdocument.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index 0eceac0ca9..897c56a891 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -389,9 +389,9 @@ Snapshot::~Snapshot()
{
}
-void Snapshot::insert(const Document::Ptr &document)
+void Snapshot::insert(const Document::Ptr &document, bool allowInvalid)
{
- if (document && (document->qmlProgram() || document->jsProgram())) {
+ if (document && (allowInvalid || document->qmlProgram() || document->jsProgram())) {
const QString fileName = document->fileName();
const QString path = document->path();