Commit Graph

855 Commits

Author SHA1 Message Date
Christian Kamm
9ea0380a4d QmlJS: Enforce Context always being linked.
The default way of creating a Context is through Link.

Change-Id: Ia81f7ce90ba2b33d02eed432a61be836d404bedd
Reviewed-on: http://codereview.qt.nokia.com/1041
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-07-05 11:52:09 +02:00
Christian Kamm
f691d3824a QmlJS: Remove unused methods from Context
Change-Id: I1e4a013ee11f9747d6936c15bf81e971ca4e4f23
Reviewed-on: http://codereview.qt.nokia.com/1040
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-07-05 08:46:39 +02:00
Christian Kamm
8b778b266b QmlJS: Rename Interpreter::Engine -> ValueOwner
Also move to a separate file.

Change-Id: I05910e8cf04a533b5d09a1c16e612e3b99b1d606
Reviewed-on: http://codereview.qt.nokia.com/1039
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-07-05 08:44:16 +02:00
Christian Kamm
f229def962 Fix UiPublicMember::lastSourceLocation.
Mirrors http://codereview.qt.nokia.com/#change,755

Change-Id: I7d1222bda67344456710ada52af33d17688627ca
Reviewed-on: http://codereview.qt.nokia.com/757
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-06-27 10:45:51 +02:00
Christian Kamm
55b11db1f7 QmlJS: Fix error location for prototype errors.
Change-Id: Iaeb96ff67cfc92bcddeb1b7075b7fdcbaed317c0
Reviewed-on: http://codereview.qt.nokia.com/691
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-06-24 11:32:48 +02:00
Christian Kamm
4f05d53ef5 QmlJS: Add 'reset code model' action.
Having to restart Creator should be a thing of the past.

Task-number: QTCREATORBUG-4813
Change-Id: Ide242ee299b5d34aecba4823032e27741dde4a86
Reviewed-on: http://codereview.qt.nokia.com/668
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-06-23 22:22:03 +02:00
Christian Kamm
4bf5f4bd94 QmlJS: Respect the REVISION property for methods and properties.
Task-number: QTCREATORBUG-3907
Change-Id: Ic2c1f8cafe381e5216ae7ad73502ca0fae20dda0
Reviewed-on: http://codereview.qt.nokia.com/656
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-06-23 13:39:08 +02:00
Christian Kamm
33a130e222 QmlJS: Fix completion inside grouped propery bindings.
Task-number: QTCREATORBUG-3541
Change-Id: Ida8e59b65836c8515fbfbd2a9e4737d9ae04e76c
Reviewed-on: http://codereview.qt.nokia.com/639
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-06-23 11:47:07 +02:00
Christian Kamm
0f254adcc3 QmlJS: Fix completion of 'anchors.'.
The hasChildInPackage function was broken, so we completed 'anchors:'
instead.

Task-number: QTCREATORBUG-5180
Change-Id: I0e0d68aec3cf4e5bea991e39169beecf541ce477
Reviewed-on: http://codereview.qt.nokia.com/643
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-06-23 11:02:35 +02:00
Christian Kamm
756e00b15f QmlJS: Always generate a onXyzChanged slot.
Even if the NOTIFY signal listed for the property has a different name.

Task-number: QTCREATORBUG-3614
Change-Id: I748cddab89732acd6a56b243610be52873225064
Reviewed-on: http://codereview.qt.nokia.com/637
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-06-23 11:02:18 +02:00
Christian Kamm
fc88340c6c QmlJS: Setup QmlEnumValues even if enum is non-local.
Change-Id: Ib7a3621c14b6dfbdf36c75abac282c08f47e55ca
Reviewed-on: http://codereview.qt.nokia.com/559
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-06-22 12:07:06 +02:00
Christian Kamm
d1a83a3e6c QmlJS: Add qsTr and friends to code model.
Change-Id: I9a16549da341500fc273ebbc480d7aa901b17e41
Reviewed-on: http://codereview.qt.nokia.com/548
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-06-21 14:31:57 +02:00
Christiaan Janssen
5a1f5c6fc8 QmlLivePreview: correctly formating file URL
Change-Id: I7c77d7854dac8e28cd5bcdeb4e6a8687fdb8606e
Reviewed-on: http://codereview.qt.nokia.com/361
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-06-08 13:45:38 +02:00
Fawzi Mohamed
fe564852ad Qmljs: added scope for blocks in UiScriptBindings and UiPublicMember
correctly insert the scope for code blocks in UiScriptBindings and
UiPublicMember, and improve find usages for types (correctly detecting
variables in the same scope)

Change-Id: Iaaf1a59f041f3831fbe04243b220fb85fde76479
Reviewed-on: http://codereview.qt.nokia.com/335
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-06-07 13:04:21 +02:00
Tobias Hunger
148e1fdf67 QMLJS: Remove dead code
Change-Id: Ieb98a43ad1f5169b8da4c5d662a8f73605e2654f
Reviewed-on: http://codereview.qt.nokia.com/352
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-06-07 10:35:49 +02:00
Fawzi Mohamed
752ea43111 Qmljs: find usages for types and packages
detects and finds usages of types and packages in qml and javascript

Change-Id: Id13f48e435258ff10ab3e6f49049f7bb602a900f
Reviewed-on: http://codereview.qt.nokia.com/277
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-06-06 14:08:15 +02:00
Christian Kamm
b729d4b973 QmlJS: Fix uses of Scanner::state().
Change-Id: I5195fc43e8a6653bf52c0eaa6cddb8dfd25b6217
Reviewed-on: http://codereview.qt.nokia.com/319
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-06-03 08:53:24 +02:00
Fawzi Mohamed
96129accb5 Qml Editor: accept imports with absolute paths
qmljs code model now correctly handles absolute paths in imports

Change-Id: I6a4bcfbe9a8d9ab70b5fcac1df36ba9802ff5efe
Reviewed-on: http://codereview.qt.nokia.com/256
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-05-31 10:54:36 +02:00
Christian Kamm
83072da8b0 QmlJS: Fix potential linking problem.
Don't use plugin from libs/qmljs.

Change-Id: Ia345c567cd1f244ab2191017810ef3eeb91fe0e4
Reviewed-on: http://codereview.qt.nokia.com/213
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-05-30 15:19:06 +02:00
Christian Kamm
060ca8d1cb Prefer C++-style cast.
Change-Id: Id5e300c2e28bc704cbd1ae0d6022be4db8535429
Reviewed-on: http://codereview.qt.nokia.com/203
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-05-30 14:51:45 +02:00
Christian Kamm
88dc2d71fb QmlJS: Import 'as' has precedence over types imported without as.
Change-Id: Iece286c9d1725d2bb1e3eff57cd73af97dd8c748
Reviewed-on: http://codereview.qt.nokia.com/181
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-05-30 11:38:51 +02:00
Christian Kamm
f0a4e7e225 QmlJS: Output qmltypes parse warnings to General messages pane.
Change-Id: I8ca100ef141082c7606bb98f8a2f81502b14e1af
Reviewed-on: http://codereview.qt.nokia.com/204
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-05-30 11:32:23 +02:00
Christian Kamm
715cee76a9 qmldump: Bump to QtQuick.tooling 1.1, make parser more permissive.
The qmltypes file reader now ignores unknown bindings and components
to allow for better forward-compatibility.

Change-Id: I2e31c17344dc8fdcd301a62c8d08e98c29ef53ee
Reviewed-on: http://codereview.qt.nokia.com/202
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-05-30 11:26:54 +02:00
Christian Kamm
cf7663b2de QmlJS: Read the 'revision' property generated by qmldump.
Change-Id: Ia31b1845b1e1e5aabc347dc115e580c72e36f4e3
Reviewed-on: http://codereview.qt.nokia.com/200
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-30 09:31:37 +02:00
Christian Kamm
8742026380 QmlJS: Allow for QML modules with version subdirectories.
That means
import Foo 2.1
can resolve to
/path/Foo.2.1 or
/path/Foo.2 or
/path/Foo

Task-number: QTCREATORBUG-4607
Change-Id: Ie1efc5be2ca2ed3ccc130e8a662f94aed11bec1a
Reviewed-on: http://codereview.qt.nokia.com/194
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-30 08:25:19 +02:00
Christian Kamm
96cde1e9de QmlJS: Fix import cache usage with 'as' imports.
Change-Id: I6c057e494f87df927adc7b83c6caf1ecc729ac65
Reviewed-on: http://codereview.qt.nokia.com/176
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-05-27 11:49:01 +02:00
Christian Kamm
a7f4e5fab5 QmlJS: Separate imported types and imported JS scopes.
Task-number: QTCREATORBUG-4981
Change-Id: I06d3e428ca4928296a3d5977aeff29fc3217c37c
Reviewed-on: http://codereview.qt.nokia.com/175
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-05-27 11:48:53 +02:00
Christian Kamm
8a8b371ecc QmlJS: Initialize error state in PrototypeIterator.
Change-Id: I231b847607d0558080d0dc0b6392bae5b833d65a
Reviewed-on: http://codereview.qt.nokia.com/107
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-05-25 11:51:05 +02:00
Christiaan Janssen
3cf5379380 QmlLivePreview: removing and inserting animations and transitions
Change-Id: Ic776f63f5d7925ac7dfd99be53c10b9af4cb9545
Reviewed-on: http://codereview.qt.nokia.com/75
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-05-24 13:03:43 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00
Christian Kamm
d67b7d17dc QmlJS: Refactor ObjectValue members.
* property -> lookupMember
* setProperty -> setMember
* removeProperty -> removeMember

Change-Id: I638479ee2b90b684283e714630bdcab237f6b3f2
Done-with: Fawzi Mohamed
Reviewed-on: http://codereview.qt.nokia.com/77
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-05-24 11:55:03 +02:00
Friedemann Kleint
a3c9cb995d Compile fix
Change-Id: I8f3eb7d21074fec00de870d33e493842286222ee
Reviewed-on: http://codereview.qt.nokia.com/51
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-05-23 08:49:03 +02:00
Christian Kamm
f027b1da87 QmlJS: Make the Scanner recognize regular expression literals.
Task-number: QTCREATORBUG-4566
Change-Id: I48b08f8eee79b25d0ebe186b996cdcb8f1979e3d
Reviewed-on: http://codereview.qt.nokia.com/38
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-23 08:30:26 +02:00
Christian Kamm
0bf18d008b QmlJS: Find prototype resolution errors.
To avoid lots of follow-up errors where the root cause is a failed
prototype resolution or a prototype cycle.

Task-number: QTCREATORBUG-4952
Change-Id: Id474c8c6c152c993aca8c6c421b6d88eb1481676
Reviewed-on: http://codereview.qt.nokia.com/36
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2011-05-20 13:33:18 +02:00
Christiaan Janssen
2d41159dab QmlLivePreview: avoid compiler warnings on gcc on mac
Reviewed-by: Roberto Raggi
2011-05-18 12:30:37 +02:00
Christiaan Janssen
09a78a3ae7 QmlLivePreview: adding states to an item
Reviewed-by: Kai Koehne
2011-05-17 10:42:45 +02:00
Christian Kamm
4937769eab QmlJS: Don't add invalid imports to TypeEnvironment.
Done-with: Fawzi Mohamed
2011-05-16 12:21:20 +02:00
Christian Kamm
cf15e14e5e QmlJS: Add tooltips to imports.
Task-number: QTCREATORBUG-4814
2011-05-12 15:29:41 +02:00
Christian Kamm
d72bddc7da QmlJS: Update to new QmlJS parser.
UiPublicMember is now initialized with a statement.
2011-05-12 13:39:53 +02:00
Christian Kamm
d0b12f8f19 QmlJS: Remove unused argument for Link helper function. 2011-05-11 09:13:13 +02:00
Friedemann Kleint
ddf4b613f3 Krazy fixes (spelling, single char strings, char constants). 2011-05-10 15:21:41 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Christian Kamm
d05992d0fa QmlJS: Stop doing significant work in constructors.
To avoid order-of-initialization problems.

Reviewed-by: Thomas Hartmann
2011-05-06 13:48:55 +02:00
Christiaan Janssen
89d9b83aa2 QmlDebugger: adding slots to items in Live Preview
Reviewed-by: Kai Koehne
2011-05-05 17:03:37 +02:00
Pawel Polanski
d9775a4159 Compilation fix 2011-05-04 12:13:03 +02:00
Christian Kamm
a9662aef0f Add files missing from 02b7eacf4b 2011-05-04 11:52:55 +02:00
Christian Kamm
02b7eacf4b QmlJS: Fix type detection for alias properties.
Task-number: QTCREATORBUG-2306
2011-05-04 11:14:35 +02:00
Christian Kamm
a03de5f717 QmlJS: Disable unhelpful warning. 2011-04-26 14:44:53 +02:00
Christian Kamm
8d4d88f072 QmlJS: Fix object literal indent in property initializers. 2011-04-21 12:56:59 +02:00
Christian Kamm
d0d0a8c07e QmlJS: Fix indent of object literals.
Reviewed-by: Roberto Raggi
2011-04-21 12:25:15 +02:00