Commit Graph

406 Commits

Author SHA1 Message Date
Christian Kamm
5f04fbba1a QmlJS indenter: Fix for expressions starting with numbers or strings.
Reviewed-by: Roberto Raggi
2010-12-09 13:28:43 +01:00
Thomas Hartmann
0eb18f850e QmlJSCheck: adding more checks
We are checking for duplicate ids and duplicate property definitions now.
2010-12-07 17:33:51 +01:00
Christian Kamm
8b339f921f JS checks: Check code block script bindings for common errors.
Reviewed-by: Erik Verbruggen
2010-12-06 10:58:58 +01:00
Christian Kamm
23d7752815 JS checks: Allow blocks after for(var ...).
Also
* check the condition of the 'for(var' statement for assignment
* allow comma expressions in 'for(var'

Reviewed-by: Erik Verbruggen
2010-12-06 10:58:58 +01:00
Thomas Hartmann
4ce19d4bde QmlJSInterpreter: adding public API to ASTObjectValue
Those are needed for the Visual Editor

Reviewed-by: Christian Kamm
2010-12-01 17:01:02 +01:00
Thomas Hartmann
2bb6ad4193 QmlJSInterpreter: specifying detailed types for QFont/QVector3D
We should differentiate between int and real

Reviewed-by:  Christian Kamm
2010-12-01 17:01:02 +01:00
Christian Kamm
847e5dfb61 QmlJS: Don't warn about expression statements in script bindings.
Reviewed-by: Roberto Raggi
2010-11-29 12:21:02 +01:00
Christian Kamm
5355c8ef4c QmlJS: Don't warn for "string == ''" and "boolean == true".
Reviewed-by: Roberto Raggi
2010-11-29 11:52:30 +01:00
Christian Kamm
042ee8de01 QmlJS: Don't warn on 'numbervalue == 0'.
Reviewed-by: Roberto Raggi
2010-11-29 11:20:45 +01:00
Rhys Weatherley
a9a7f0458f Fix syntax highlighting of multiline QMLJS strings 2010-11-29 09:57:16 +01:00
Christian Kamm
055aa15fcc QmlJS: Remove overzealous 'undefined' check for enums.
The "value might be 'undefined'" warning triggered whenever the static
expression evaluator failed to produce a value. At the moment, it does
so for almost all non-trivial expressions.

The warning is now disabled.

Task-number: QTCREATORBUG-3208
2010-11-29 09:01:40 +01:00
Christian Kamm
f40b3c22f4 QmlJS: Add JSLint-style warnings for common JS traps.
Task-number: QTCREATORBUG-3071
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:45 +01:00
Christian Kamm
124358d258 QmlJS: Enhance check pass to do lookup... and disable it.
It still generates too many false-negatives for now. Will be enabled
once the remaining lookup failures have been fixed.

Reviewed-by: Erik Verbruggen
2010-11-25 15:06:45 +01:00
Christian Kamm
05831a8ea5 QmlJS: Fix binding and scoping function expressions.
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
5dd92328fb QmlJS: Improve error reporting for failed plugin dumps.
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
b548ab16c8 QmlJS: Mark invalid urls and files in url properties as an error.
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
34093064fe QmlJS: Make evaluator understand expression statements.
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
93967104f3 QmlJS: Reactivate instantiating component scope detection.
* Bind::usesQmlPrototype is now significantly more performant
* type environments are no longer hashed by filename, but rather
  by Document *
* duplicate scope builds are avoided

Task-number: QTCREATORBUG-2835
Reviewed-by: Erik Verbruggen
2010-11-25 15:06:44 +01:00
Christian Kamm
aa2d9e6dd6 QmlJS: Return owning object from lookupMember. 2010-11-17 14:50:13 +01:00
Christian Kamm
6c9f32ba60 QmlJS: Also bind FunctionExpressions.
Reviewed-by: Erik Verbruggen
2010-11-16 15:27:26 +01:00
Christian Kamm
f7a077b1fa QmlJS: Avoid infinite loop with recursive prototypes. 2010-11-15 10:36:22 +01:00
Christian Kamm
657dee02e0 QmlJS: Remove ComponentVersion::major/minor.
They are unusable on linux as there are commonly-included macros
of the same name.
2010-11-12 14:18:46 +01:00
Christian Kamm
cab2180f7e QmlJS: Detect whether cursor is in an import.
Reviewed-by: Roberto Raggi
2010-11-12 13:51:11 +01:00
Christian Kamm
efb3d22c92 QmlJS: Complete '{' instad of ':' at the end of 'A on b' bindings.
Task-number: QTCREATORBUG-2642
Reviewed-by: Erik Verbruggen
2010-11-12 10:54:20 +01:00
Christian Kamm
83e7d7c350 QmlJS: Add a UrlValue.
This will allow distinguishing mere strings from urls and allow
different completion.

Reviewed-by: Erik Verbruggen
2010-11-12 10:35:41 +01:00
Christian Kamm
402566626a QmlJS: Determine whether cursor is inside a string literal.
Reviewed-by: Erik Verbruggen
2010-11-12 10:35:34 +01:00
Thomas Hartmann
f6fb0d82ed Test: Extend QmlJS code model test. 2010-11-11 11:49:11 +01:00
Thomas Hartmann
bb9a9d060f QmlObjectValue: bugifx for QmlObjectValue::propertyType()
We have to follow the prototype chain

Reviewed-by: Christian Kamm
2010-11-11 11:49:11 +01:00
Thomas Hartmann
d63199ca13 QmlJS: Resolve property types within package.
Reviewed-by: Christian Kamm
2010-11-11 11:49:11 +01:00
Christian Kamm
806c8a563d QmlObjectValue: Add convenience functionality.
Added
hasLocalProperty()
hasProperty()
keysForEnum()

Reviewed-by: Christian Kamm
2010-11-11 11:49:11 +01:00
Thomas Hartmann
ba39234627 QmlJS: Adding IntValue and RealValue
This allows to distinguish between int an real numbers

Reviewed-by: Christian Kamm
2010-11-11 11:49:11 +01:00
Thomas Hartmann
f7e7de44cb QmlJS: Dump isWritable and isPointer for types.
Reviewed-by: Christian Kamm
2010-11-11 11:49:11 +01:00
Thomas Hartmann
4255220c35 QmlJS: Fixing type hierarchy for holes (non exported types)
Done-with: Christian Kamm
2010-11-11 11:49:10 +01:00
Christian Kamm
f366754462 Move shared code to a new QmlJSTools plugin.
Reviewed-by: Thomas Hartmann
2010-11-11 11:49:10 +01:00
Christian Kamm
62dba8e4c1 QmlJS: Fix incorrect completion inside 'Item\n{ ... }'.
The newline made the linizer add an automatic semicolon after Item,
causing the completion context finder to not recognize it as an object
definition.

Task-number: QTCREATORBUG-2658
Reviewed-by: Roberto Raggi
2010-11-10 11:08:36 +01:00
Tobias Hunger
cf3a418cd8 Fix spelling in comments
Krazy was complaining about those.
2010-11-03 12:45:34 +01:00
con
59c301a8c8 Make tests compile on Mac. Use qtLibraryName instead of qtLibraryTarget.
qtLibraryTarget is only defined if used with TEMPLATE=lib, which makes
it fail in pri files that are used for app pro files. The tests still
don't run because of run time linking issues.
2010-11-01 14:55:37 +01:00
con
995dfff23a Merge remote branch 'origin/2.1.0' into 2.1
Conflicts:
	share/qtcreator/translations/qtcreator_pl.ts
2010-10-28 17:47:04 +02:00
Christian Kamm
8cd68b3b06 QmlJS: Fix completion for 'anchors.' and similar properties.
The detection of whether a type or one of its children is exported was
broken when we fixed the type information for the QtQuick module.

Reviewed-by: Erik Verbruggen
2010-10-27 18:19:45 +02:00
Friedemann Kleint
791bb483fd Debugger/JS Code model: Set environment for QML tools correctly.
Set complete build environment (MinGW).

Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>

Task-number: QTCREATORBUG-2883
(cherry picked from commit f1fb0bddb1)
2010-10-26 19:35:05 +02:00
Friedemann Kleint
f1fb0bddb1 Debugger/JS Code model: Set environment for QML tools correctly.
Set complete build environment (MinGW).

Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>

Task-number: QTCREATORBUG-2883
2010-10-26 15:39:37 +02:00
Roberto Raggi
c23721c860 Updated the QML/JS front-end. 2010-10-26 13:50:17 +02:00
Thomas Hartmann
408214486f QuickToolBar: reduce usage of lookup context
Getting the lookup context is expensive. So it is now done only
on user interaction.




Reviewed-by: Roberto Raggi
2010-10-21 15:42:26 +02:00
Christian Kamm
b2369973a4 QmlJS: Fix a performance problem.
In order to determine all components that instantiate a given component,
Bind::usesQmlPrototype was called on each document in the snapshot.
That, in turn, had to iterate over all object definitions inside the
document, resolving their prototype references.

All in all, it lead to a very large amount of fairly expensive lookups
that were slowing down Creator considerably.

Reviewed-by: Erik Verbruggen
2010-10-20 14:54:07 +02:00
Kai Koehne
9eea942aa6 QmlOutline: Fix reordering of array elements
Make sure that a comma is added when inserting array elements
into the array.

Task-number: QTCREATORBUG-2796
Reviewed-by: Erik Verbruggen
2010-10-20 14:48:58 +02:00
Christian Kamm
a2824be292 QmlJS: Fix false-positive errors reported for ListElement, Connections.
Task-number: QTCREATORBUG-2802
Reviewed-by: Roberto Raggi
2010-10-20 11:07:22 +02:00
Roberto Raggi
5e28dad574 Updated the QML/JS front-end.
Reviewed-by: Christian Kamm
2010-10-19 16:11:54 +02:00
Christian Kamm
872f7eb459 QmlJS: Fix completion for enums on the global Qt object.
Reviewed-by: Erik Verbruggen
2010-10-19 11:08:09 +02:00
Christian Kamm
836366c187 QmlJS: Force a semantic check when library information changes.
Task-number: QTCREATORBUG-2640
Reviewed-by: Roberto Raggi
2010-10-15 10:09:40 +02:00
Christian Kamm
a30c016189 QmlJS: Fix several crashes when UiQualifiedId::name is 0.
Task-number: QTCREATORBUG-2737
Reviewed-by: Kai Koehne
2010-10-14 15:15:56 +02:00