Commit Graph

20 Commits

Author SHA1 Message Date
Simon Hausmann 9d7b27f5bf Clean up JS .import/.pragma directive scanning
There's a scanner in QQmlJS::Lexer::scanDirectives that can parse those, so
let's get rid of extra parser that operates on a string. Instead this way we
can do the scanning all in one shot, avoid detaching a copy of the source code
string and (most importantly) bring the parser closer to the copy in Qt
Creator, which uses the directives approach to extract imports and pragma.

Change-Id: Iff6eb8d91a45d8a70f383f953115692be48259de
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2015-01-08 22:08:19 +01:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-25 11:28:46 +02:00
Simon Hausmann 1a97598556 Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Conflicts:
	src/imports/qtquick2/plugins.qmltypes
	src/qml/debugger/qv8debugservice.cpp
	src/qml/qml/qml.pri
	src/qml/qml/qqmlcompiler.cpp
	src/qml/qml/qqmlcomponent.cpp
	src/qml/qml/qqmlcontext.cpp
	src/qml/qml/qqmldata_p.h
	src/qml/qml/qqmlengine_p.h
	src/qml/qml/qqmljavascriptexpression.cpp
	src/qml/qml/qqmlxmlhttprequest.cpp
	src/qml/qml/v4/qv4bindings.cpp
	src/qml/qml/v4/qv4irbuilder.cpp
	src/qml/qml/v4/qv4jsonobject_p.h
	src/qml/qml/v8/qqmlbuiltinfunctions.cpp
	src/qml/qml/v8/qv8bindings.cpp
	src/qml/qml/v8/qv8contextwrapper.cpp
	src/qml/qml/v8/qv8listwrapper.cpp
	src/qml/qml/v8/qv8qobjectwrapper.cpp
	src/qml/qml/v8/qv8qobjectwrapper_p.h
	src/qml/qml/v8/qv8sequencewrapper_p_p.h
	src/qml/qml/v8/qv8typewrapper.cpp
	src/qml/qml/v8/qv8valuetypewrapper.cpp
	src/qml/types/qqmldelegatemodel.cpp
	src/quick/items/context2d/qquickcanvasitem.cpp
	src/quick/items/context2d/qquickcontext2d.cpp
	sync.profile
	tests/auto/qml/qjsengine/tst_qjsengine.cpp
	tests/benchmarks/qml/animation/animation.pro
	tools/qmlprofiler/qmlprofiler.pro

Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
2013-06-24 11:48:46 +02:00
Lars Knoll 39fe77d048 Fix qmlmin test
Exclude the test262 test suite, as qmlmin can't deal with
all of the test cases there.

Change-Id: Ie56c0d9adecc6b1ae0ddcbcd3edd5b0eaf30cd4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 13:56:23 +02:00
Sze Howe Koh 21e162d410 Doc: Qt QML: Fix module name format
Follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

QtQml -> Qt QML

Change-Id: I45ca4496a02214feab48707b026c6bec085df138
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-19 14:14:03 +02:00
Erik Verbruggen a89a652bf5 Fix hexadecimal escape sequence validation in strings.
Give an error message when the sequence does not conform to the grammar.
Although the specification does not explicitly state that this is an
error, this is the behaviour of both JSC and V8.

Change-Id: I34d189f07628bc6cc40b13bfbb8d09bee7810ced
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-19 01:57:27 +01:00
Gunnar Sletta 9c54d0ef8f Merge branch 'stable' into dev
Conflicts:
	src/qml/doc/qtqml.qdocconf
	src/quick/doc/qtquick.qdocconf

Change-Id: I087fa14720995a5e53c43567dc4a3c29eb9992a9
2013-01-17 22:08:56 +01:00
Erik Verbruggen 5558c55de8 Fix automatic semicolon insertion before ++/-- operators.
Also move the tilde token from isBinop to the lex method, because it is
not a binop, but should still be delimited.

Change-Id: I532260f4f3ebdde2d38128b41d11bce5a113d1f1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-11 12:34:56 +01:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Erik Verbruggen 58985b9467 Fix unicode escape sequence validation in strings.
Give an error message when the sequence does not conform to the grammar.
Note that both \u and \x (without any numbers following it) are not
valid escape sequences in ECMA5.1.

Change-Id: I14348984c680b0ce86e05faad5630afc1e98cd02
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-01-08 13:01:25 +01:00
Erik Verbruggen a65824f353 Fix: disallow incomplete hex numbers "0x" and "0X".
See also ECMA 5.1, 7.8.3, rule HexIntegerLiteral.

Change-Id: I356dc7cfbc88890bb7f35c8bc4219a37633177f8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-07 16:06:56 +01:00
Lars Knoll 163b005609 Fix the test suite
We now fail when parsing octal numbers or escape sequences. This
is ok according to the EcmaScript 5.1 spec. So remove all usages
of these numbers or sequences.

In addition delete an invalid test case that can't possibly be
parsed correctly. V8 also chokes on it.

Change-Id: I889de2810310f38206343d16175f9e31ddb44d30
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-11 14:50:32 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
J-P Nurmi 31d5249ae1 QtQml tests: remove QSKIP -> wrap within !QTEST_CROSS_COMPILED guards
Change-Id: I200bf6feb137e39061f144bdabd825dea70bd539
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-09-07 15:55:36 +02:00
Matthew Vogt 6aeff1b542 Reduce memory consumption of source coordinates
Reduce memory consumption by storing source location coordinates
as 16-bit variables (in run-time structures).  Also modify qmlmin
to restrict line lengths so that the column bound is not normally
exceeded.

Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-08-16 01:13:50 +02:00
Matthew Vogt a1a2c81d7f Improved error messages for malformed .import statements
Report errors in .import statements, rather than pass them through
to V8 to yield 'Syntax error'.

Task-number: QTBUG-24867
Change-Id: I111b3bd3d198e97f42b29591f61753e86295aeb2
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-07-11 01:49:59 +02:00
Kurt Korbatits 5de103291d Fixed unittests skipping for cross_compile option
- qmlmin, qqmlparser, examples unittests to skip source dependent
  tests when cross_compile option used as content not available.

Change-Id: Ieaadeff0c303f0a633b8a3cc506a764ea995cf42
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-03-29 00:35:32 +02:00
Kurt Korbatits 65764c0334 Changed qml tests to work from install directory
- Changed tests to use TESTDATA
- moved qqmlcontext to private test as it contains private header
- added check for cross_compile option to skip when sources not available

Change-Id: I0f68f58ffcb1b41b8e40a9851e3e003fe72ee2f9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-07 06:24:18 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00