Commit Graph

169 Commits

Author SHA1 Message Date
Christian Kamm
42959f8fef Remove the lookup into including Qml files in the root scope of a JS file. 2010-02-12 10:05:13 +01:00
Christian Kamm
2b1adbf610 Improve building of the Qml/JS scope chain.
* For JS files: Add each Qml component that sources the file in a Script
  tag to the scope chain.
* For Qml components: Add each component that instantiates the component
  to the scope chain.
* Generate the full list of documents required for completion in a
  given file. Previously, files that included the file were missing.
2010-02-11 19:08:33 +01:00
Roberto Raggi
7a65191306 Moved the code in the source file. 2010-02-11 10:19:41 +01:00
Roberto Raggi
bdf8c94809 Get rid off the friend QmlJS::Link declaration. 2010-02-10 17:06:32 +01:00
Roberto Raggi
56df4e29ce Fixed possible crash when trying to link invalid documents. 2010-02-10 16:24:22 +01:00
Roberto Raggi
220f6b43c2 Register the Qt' and the console' object. 2010-02-10 15:51:53 +01:00
Roberto Raggi
978c89f506 Get rid of obsolete README. 2010-02-09 14:03:35 +01:00
Alessandro Portale
2117d6af90 Compile fix for MSVC
Reviewed-by: Roberto Raggi <qtc-committer@nokia.com>

	modified:   src/libs/qmljs/qmljsinterpreter.cpp
2010-02-09 12:29:10 +01:00
Roberto Raggi
0567adbc32 Removed useless qDebug. 2010-02-09 12:16:19 +01:00
Roberto Raggi
3d44c5621d Improved completion of JavaScript expressions. 2010-02-09 11:37:58 +01:00
Roberto Raggi
967ed09c29 Initial support of `Follow symbol under cursor' for QML/JS. 2010-02-09 11:37:58 +01:00
Erik Verbruggen
09cae866e5 Synced changes with Qt. 2010-02-08 14:29:43 +01:00
Oswald Buddenhagen
d4ac9c9f8e re-enable QT_USE_FAST_CONCATENATION
includes workaround for breakage with old g++
2010-02-08 13:00:57 +01:00
Tobias Hunger
0ae3f86c3a Fix building in windows
Reviewed-by: Roberto Raggi
2010-02-04 11:08:57 +01:00
Christian Kamm
25e04d8ef1 Make QmlJS::Link private. Use Context::build to set up a context. 2010-02-04 10:34:49 +01:00
Christian Kamm
14f483c67b Remove unused friend of QmlJS::Bind. 2010-02-04 10:34:49 +01:00
Christian Kamm
e984691fe6 Fix prototype reference resolution for Qml objects. 2010-02-04 10:34:49 +01:00
Roberto Raggi
85ff8c2259 Compile. 2010-02-03 16:34:56 +01:00
Roberto Raggi
fcf81b22ed Get rid of BindPtr.
There is no reason to store the Bind object in a QSharedPointer because the `binder' has the same
lifetime of its document.
2010-02-03 15:59:15 +01:00
Roberto Raggi
976d74ca73 Add support for lazy prototypes.
Done-with: ckamm
2010-02-03 15:42:32 +01:00
Roberto Raggi
1f0b717ad2 Completion for global variables in JS.
* Support for lookup JS vs Qml
* Bind global variables.

Done-with: ckamm
2010-02-03 14:34:06 +01:00
Christian Kamm
49c43aaab1 Get rid of Environment, introduce external ScopeChain in Link.
Done-with: Roberto
2010-02-03 10:59:52 +01:00
Roberto Raggi
ba18e70034 Introduced QML/JS references.
Done with ckamm
2010-02-03 10:24:25 +01:00
Roberto Raggi
95849cb0bd Store bindings and definitions in one single table. 2010-02-03 09:34:28 +01:00
Roberto Raggi
14ffb1e465 Some refactoring needed to create ranges for JavaScript functions. 2010-02-02 16:36:14 +01:00
Christian Kamm
03fa188b41 Bind each QML document after parsing. Link them before use.
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2010-02-02 16:03:43 +01:00
Roberto Raggi
e7a330f92a Fixed the member lookup.
We should never look at the scope chain of the base object when performing a dependant lookup.
2010-02-02 15:54:38 +01:00
Roberto Raggi
fac977a5bd Try to get the type from a qualified-id. 2010-02-02 15:02:21 +01:00
Christian Kamm
c0506785bf Drop snapshot argument from Bind constructor. 2010-02-02 11:51:10 +01:00
Roberto Raggi
b102690b00 Bind the reachable documents. 2010-02-02 11:48:32 +01:00
Roberto Raggi
6dcc675eb2 Guess the type of a global variable by looking at its initializer. 2010-02-01 17:31:28 +01:00
Roberto Raggi
a8bc5a4bb0 Create bindings for the javascript soure elements. 2010-02-01 17:20:46 +01:00
Roberto Raggi
15ae1001f4 Process QML Script elements. 2010-02-01 17:05:07 +01:00
Roberto Raggi
4d34ee7385 Removed obsolete code. 2010-02-01 17:05:06 +01:00
Roberto Raggi
85ea5c29a0 Made the Bind constructor protected. 2010-02-01 17:05:06 +01:00
Roberto Raggi
0f6551c43f Introduced ASTObjectValue. 2010-02-01 13:54:59 +01:00
Roberto Raggi
0cf48cb45d Introduced ASTFunctionValue. 2010-02-01 13:54:59 +01:00
Roberto Raggi
450ad48fe7 Clean up QmlJS::Bind. 2010-02-01 13:54:59 +01:00
Roberto Raggi
0f031609b1 Cleanup. 2010-02-01 13:54:59 +01:00
Oswald Buddenhagen
75b42f18d8 Merge remote branch 'origin/1.3'
Trailing whitespace removal re-applied manually.
2010-01-29 22:50:23 +01:00
Roberto Raggi
80b5a6b50a Removed useless code. 2010-01-29 15:29:45 +01:00
Roberto Raggi
04161a4ced Introduced QmlJSScanner::scanComments/setScanComments(onoff). 2010-01-29 15:05:22 +01:00
Roberto Raggi
fbbc27be32 Get rid off unused regexp QmlJSIndenter::label. 2010-01-29 15:01:49 +01:00
Roberto Raggi
206dafcd94 Removed unused code. 2010-01-29 14:58:41 +01:00
Christian Kamm
1ec6cbd913 Fix for renamed directory imports in the QML code model. 2010-01-29 13:36:41 +01:00
Christian Kamm
a49f313c0c Drop implicit directory imports, implement renamed directory imports. 2010-01-29 13:22:57 +01:00
Roberto Raggi
922c607b4f Highlight QML context types. 2010-01-29 11:53:41 +01:00
Roberto Raggi
913e248366 Fixed the indentation of if-else statements. 2010-01-29 11:31:41 +01:00
Roberto Raggi
c5f4983b0c Highlight `import' keyword. 2010-01-29 11:23:06 +01:00
Roberto Raggi
14207aa856 Fixed highlihing of QML context keywords. 2010-01-29 11:20:42 +01:00