Add support for scanning javascript files.
authorMorten Johan Sørvig <morten.sorvig@digia.com>
Tue, 11 Feb 2014 14:19:33 +0000 (15:19 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 25 Feb 2014 16:08:02 +0000 (17:08 +0100)
commitf7a8a41e48fda4d7cb395e435fad292770d9c467
tree63308d0262c82c9a477fd1f8ab4deea3e914f1cc
parent501bd0fa6709caff3d5425abc16fa8ef3f5c88af
Add support for scanning javascript files.

Javascript may contain ".import" pragmas/statements,
which should be treated in a similar way as qml file
imports.

Add findQmlImportsInJavascriptFile() which extracts and
parses the .import lines. Refactor findQmlImportsInFile()
to handle both .qml and .js and call out to the correct
parsing function.

Add "-jsFiles" for specifying javascript
files on the command line similar to "-qmlFiles".

Task-number: QTBUG-35349

Change-Id: I6b8e0cc254c1edcf16940bec5cfda7c2637f115e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
tools/qmlimportscanner/main.cpp