Commit Graph

240 Commits

Author SHA1 Message Date
Erik Verbruggen
eed0241d97 Fixed a couple of null-checks/-returns. 2010-06-04 11:15:38 +02:00
hjk
5806009d29 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qtcreator.qdoc
	src/plugins/debugger/debuggermanager.cpp
	src/plugins/texteditor/basetexteditor.cpp
2010-06-02 09:57:23 +02:00
Erik Verbruggen
112df597db Fixed default property discovery for custom QML components.
Reviewed-by: Christian Kamm
2010-05-31 12:21:12 +02:00
Christian Kamm
57f2b3e44d QmlJS: Allow folding of multi-line comments.
This also makes the editor auto-fold the license comment.

Task-number: QTCREATORBUG-1455
Reviewed-by: Erik Verbruggen
2010-05-27 12:56:44 +02:00
Christian Kamm
70291f457a QmlJS: Add null checks when accessing Bind::rootObjectValue.
If a document wasn't parsed correctly the binder won't be run - and
rootObjectValue will be null.

Task-number: QTCREATORBUG-1449
2010-05-20 14:02:25 +02:00
Erik Verbruggen
ef66bc98e2 Fixed QTCREATORBUG-1397.
When adding a new file, refreshing semantic errors in the open editor should
have worked. It now also works for removing existing files.

Done-with: Christian Kamm
2010-05-19 14:46:08 +02:00
Christian Kamm
62141475e3 QmlJS: Potentially fix hard-to-reproduce crash in JS completion.
* Context::build was potentially dangerous. Link and ScopeBuilder
  went out of scope before their results stopped being used.
* ScopeBuilder: If no function scope object was found, don't add it.

Reviewed-by: Erik Verbruggen
2010-05-19 14:23:08 +02:00
Christian Kamm
da6b372575 QmlJS: Move Q_DECLARE_TR_FUNCTIONS to the start of class declarations.
The documentation requires having it there.
2010-05-19 13:42:56 +02:00
Christian Kamm
4e498caf30 Fix the build.
50cc55af80 broke it.
2010-05-19 13:39:54 +02:00
Christian Kamm
50cc55af80 QmlJS: Change to a nicer way of marking strings for translation.
Reviewed-by: ossi
2010-05-19 13:32:11 +02:00
Christian Kamm
fadfe9c64e QmlJS: Generalize EasingCurve name check to all enums.
Reviewed-by: Erik Verbruggen
2010-05-19 12:24:32 +02:00
Christian Kamm
b7b50edad5 QmlJS: Allow numbers to be assigned to easing.type.
Task-number: QTCREATORBUG-1439
2010-05-19 11:21:01 +02:00
Christian Kamm
088bdb29db QmlJS: Provide good completion for PropertyChanges with a target again.
Task-number: QTCREATORBUG-1413
Reviewed-by: Erik Verbruggen
2010-05-19 11:15:57 +02:00
Christian Kamm
735f908382 QmlJS: Remove unimplemented functions from CompletionContextFinder. 2010-05-19 10:49:26 +02:00
Christian Kamm
fc3628098b QmlJS: Fix completion context finder if cursor is on empty line.
It would calculate an incorrect start token in this case as the
linizer skips past the empty line.

Task-number: QTCREATORBUG-1412
2010-05-19 10:09:13 +02:00
Christian Kamm
6f4b864487 QmlJS: Make Snapshot discard outdated Documents.
Previously, fresh versions of a Document would be added to the
_documentsByPath QMultiHash without removing the old version first.
This means Link could pick up old versions of a Document.

Task-number: QTCREATORBUG-1418
2010-05-17 12:05:18 +02:00
Christian Kamm
28ec223314 QmlJS: Fix completion for grouped property bindings.
Task-number: QTCREATORBUG-1388
Reviewed-by: Roberto Raggi
2010-05-12 14:11:23 +02:00
Christian Kamm
259007f5e6 QmlJS: Fix potential crash when a document doesn't have a type env yet.
Reviewed-by: Roberto Raggi
2010-05-11 15:28:18 +02:00
Christian Kamm
44a155c612 QmlJS: Fix completion context when cursor is to the right of inserted ;
Done-with: Erik Verbruggen
2010-04-30 14:22:55 +02:00
Erik Verbruggen
0970a8e6d2 Moved quick-exit check back to the indenter.
Reviewed-by: ckamm
2010-04-30 13:36:09 +02:00
Christian Kamm
0e12240613 QmlJS: Completion for enums.
Done-with: Erik Verbruggen
2010-04-29 16:05:25 +02:00
Christian Kamm
a48032b616 QmlJS: Improve completion for object bindings with 'on'.
Done-with: Erik Verbruggen
2010-04-29 16:05:25 +02:00
Christian Kamm
953f0daa50 QmlJS: Add a check to disallow recursive type definitions in xml file.
At least direct recursion with name="Foo" extends="Foo" is detected
and rejected.

Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
61c1ac37a0 QmlJS: Don't put automatic semicolons directly after colons.
Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
f48df24737 QmlJS: Improve property and Type completion in Qml object members.
Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
722ba33770 QmlJS: Add CompletionContextFinder to allow context sensitive completion
The plan is to use this to reduce the number of applicable
completion options, for instance for enum completion or property
names.

Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
bd71243407 QmlJS: Move parts of the indenter to the new LineInfo.
LineInfo can tell whether lines are finished or not.

Done-with: Erik Verbruggen
2010-04-29 16:05:24 +02:00
Christian Kamm
bbf5bf611c QmlJS: Change way to translate strings to nicer one.
Done-with: Erik Verbruggen
2010-04-28 10:32:45 +02:00
Christian Kamm
9af4f2c64f QmlJS: Remove unused function environment from binder.
This used to contain all functions declared in Script blocks. With them
gone, there's no reason to keep it.
2010-04-28 10:01:36 +02:00
Christian Kamm
71b9057b0b QmlJS: The qml document's path is no longer an implicit import path. 2010-04-26 10:43:59 +02:00
Lasse Holmstedt
4d0ac7c77e qml inspector now shows correct categories for custom properties
Also, a class name is added in qmjs::bind so that we have a class name
for custom properties defined inside a component.
2010-04-23 09:58:29 +02:00
Christian Kamm
3096b2a06f QmlJS: Set importing scopes for scripts correctly.
They had not yet been updated to the new way of importing javascript.

Reviewed-by: Erik Verbruggen
2010-04-22 16:36:43 +02:00
Christian Kamm
3286f48504 QmlJS: Remove Link::scopeChainAt, initialize scope chain in constructor.
Use ScopeBuilder.push(...) for the same functionality.

Reviewed-by: Erik Verbruggen
2010-04-22 16:36:43 +02:00
Christian Kamm
3067f441df QmlJS: Fix switch statement indentation.
Task-number: QTCREATORBUG-756
2010-04-21 10:52:07 +02:00
Christian Kamm
ce99372c63 QmlJS: Add variables and functions in a JS function to code model.
Allows completion of local variable and function names.

Task-number: QTCREATORBUG-942
Reviewed-by: Roberto Raggi
2010-04-20 15:20:52 +02:00
Christian Kamm
f47135c919 QmlJS: Fix code model for QSize and QSizeF.
Means their members are now completed correctly.

Task-number: QTCREATORBUG-1132
Reviewed-by: Erik Verbruggen
2010-04-15 11:41:24 +02:00
Christian Kamm
6a12c99bd1 QmlJSEditor: Improve indentation of square brackets.
Task-number: QTCREATORBUG-583
Reviewed-by: Roberto Raggi
2010-04-14 15:19:56 +02:00
Yann Bodson
9218e261b0 Fix 'capitalization' typo. 2010-04-12 15:18:21 +10:00
Friedemann Kleint
98e6eac6c2 Windows Compile fix. 2010-04-07 12:09:46 +02:00
Christian Kamm
db2f91ef8f QmlJS: Don't produce Qml type errors if plugins are imported.
Task-number: QTCREATORBUG-1021
Reviewed-by: Erik Verbruggen
2010-04-07 11:09:27 +02:00
Erik Verbruggen
4ba9a1b0c2 Fixed qualified-enum handling.
Done-with: ckamm
2010-04-06 15:41:06 +02:00
Erik Verbruggen
e615cf82a5 Fixed regression when assigning an object binding to an array property. 2010-04-06 12:57:02 +02:00
Erik Verbruggen
491bf79d5f Changed QML reading in QML designer to use the interpreter for property types. 2010-04-06 11:46:36 +02:00
Christian Kamm
9402fad726 QmlJSEditor: Build Snapshot by looking at imports of parsed files.
Previously we just scanned every directory containing a qml file for
other qml files.

This makes import ".." work.

Reviewed-by: Erik Verbruggen
2010-04-06 09:53:57 +02:00
Erik Verbruggen
b71d3eb145 Added defaultProperty attribute reading and storing. 2010-04-06 09:38:40 +02:00
Christian Kamm
8d70ab27dc QmlJS: Clean paths in the Snapshot.
To solve import resolution issues on windows.

Reviewed-by: Roberto Raggi
2010-04-01 15:21:30 +02:00
Christian Kamm
9531e75188 Revert "QmlJS: Use the canonical paths for the Documents."
Using canonical paths breaks with symlinked components. Also the editor
filename isn't canonical, so comparing them breaks.

This reverts commit efcdadd2bb.
2010-04-01 12:43:15 +02:00
Christian Kamm
49416fe888 QmlJS: Add a path->document list hash to Snapshot.
Also change the filename->document map to a hash.

Reviewed-by: Roberto Raggi
2010-04-01 11:28:56 +02:00
Christian Kamm
efcdadd2bb QmlJS: Use the canonical paths for the Documents.
Otherwise the paths may end up with ../ or /./ in them and confuse the
Qml import resolving.

Reviewed-by: Thomas Hartmann
2010-04-01 10:59:20 +02:00
Christian Kamm
811da6e31a Remove debug output that slipped into 5ed718a002 2010-03-31 15:58:23 +02:00