diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-10 10:39:44 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-10 14:05:18 +0000 |
commit | 3d21c7fdc3b70a7c0dfecec8b88beb99d03c517e (patch) | |
tree | e324b0a1a4586b762b5d1d954e8898aba90373f7 /tests | |
parent | c4aa6d71d9429bea59b5b7aadac3dd12d710acc2 (diff) | |
download | qt-creator-3d21c7fdc3b70a7c0dfecec8b88beb99d03c517e.tar.gz |
Retain ".pragma library" when reformatting JavaScript files
For ".pragma library" there is a special flag in QmlJS::Directives.
We just need to actually set the flag and query it when re-emitting the
code.
Change-Id: Ia3455fda18aba3219b02ecf092bb28987a6ccef5
Fixes: QTCREATORBUG-22326
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/reformatter/pragmalibrary.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/reformatter/pragmalibrary.js b/tests/auto/qml/reformatter/pragmalibrary.js new file mode 100644 index 0000000000..15c30ca07e --- /dev/null +++ b/tests/auto/qml/reformatter/pragmalibrary.js @@ -0,0 +1,3 @@ +.pragma library + +function foo() {} |