Commit Graph

789 Commits

Author SHA1 Message Date
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
Christian Kamm
ef96363560 QmlJS: Fix plugin dumpers running all the time if dump fails.
Task-number: QTCREATORBUG-2733
Reviewed-by: Kai Koehne
2010-10-14 15:15:44 +02:00
Kai Koehne
d1175f3ea2 QmlJSObserver: Fix crash when adding an element to some .qml files
Make sure that the 'artifical' URL of the item created actually is
absolute (starts with a file:///). Otherwise an Assert will be hit
when the imports include e.g. a .js file, and the Engine tries to
load it.

Task-number: QTCREATORBUG-2644
Reviewed-by: Olivier Goffart
2010-10-08 15:51:56 +02:00
Kai Koehne
6863a848e9 QmlJsDelta: Guard qDebug output 2010-10-08 15:51:55 +02:00
Christian Kamm
4751d92df4 QmlJS: Always register C++ based components with their C++ name.
This is the name that other components will refer to it by. For
instance, MouseArea has a 'drag' property with type 'QDeclarativeDrag',
since QDeclarativeDrag was only exported as Qt.Drag and QtQuick.Drag,
the type lookup didn't manage to resolve the name.
(cherry picked from commit b53ba61248)
2010-10-08 13:09:31 +02:00
Christian Kamm
c502c6e818 QmlJS: Fix an instance of relying on the Qt package name.
Reviewed-by: Thomas Hartmann
2010-10-01 13:52:55 +02:00
Christian Kamm
6f1c1af833 QmlJS: Prepare qmldump for multiply exported C++ objects.
In the future, builtin objects are going to be exported in Qt 4.7 and
QtQuick 1.0.

Reviewed-by: Roberto Raggi
2010-10-01 10:14:29 +02:00
Christian Kamm
b58ebe7d29 QmlJS indenter: Fix incorrect indent after break/continue.
Make sure to push a transitory state before leave(true) so it only
finishes the statement - and not the surrounding statement!

Reviewed-by: trustme
2010-09-30 19:03:29 +02:00
Lasse Holmstedt
96d991bbdc QML Observer: Build together on runtime with debugging tools
Moved qmljsdebugger to a dir under qml/, made qmlobserver compile
without creator dependencies and made it compile with debugging
helpers.

Reviewed-by: hjk
2010-09-29 09:39:30 +02:00
Christian Kamm
2fff849ae1 QmlJS: Fix initializer of property declaration not being visited in Bind
This lead to the semantic checker reporting incorrect errors in these
initializers.

Task-number: QTCREATORBUG-2340
Reviewed-by: Roberto Raggi
2010-09-28 15:50:42 +02:00
Kai Koehne
1a2e16aebd QmlOutline: Show functions in outline
Reviewed-by: Christiaan Janssen
(cherry picked from commit e871b7e330)
2010-09-28 09:25:06 +02:00
dt
299f139553 Revert "Remove the QmlJSEditor dependency from Qt4ProjectManager."
This reverts commit f8c5001382.
2010-09-27 15:56:37 +01:00
Christian Kamm
e20bfaed68 QmlJS indenter: Fix break/continue/throw in if statement without braces.
Reviewed-by: Roberto Raggi
2010-09-27 10:30:39 +02:00
Christian Kamm
b4bd5449f6 QmlJS indenter: Fix problem with object literals.
Reviewed-by: Roberto Raggi
2010-09-27 10:12:50 +02:00
Christian Kamm
449426baea QmlJS: Fix QmlComponentChain not being exported.
It's meant to be.

Reviewed-by: Daniel Molkentin
2010-09-24 15:41:13 +02:00
Christian Kamm
3f505e9982 QmlJS: Add initial 'Find Usages' support. 2010-09-24 14:11:06 +02:00
Christian Kamm
6755edc351 QmlJS: Cache some commonly used QML specific objects. 2010-09-24 14:11:06 +02:00
Christian Kamm
bfd7fd464e QmlJS: Synchronize Engine::registerValue.
When multiple threads share the Bind instance in a Document and do
lookup on the objects contained inside, that may trigger a new object
creation in some situations - which needs to be synchronized.
2010-09-24 14:11:06 +02:00