Commit Graph

574 Commits

Author SHA1 Message Date
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
Christian Kamm
13faf49322 QmlJS: Fix segfault during import resolution. 2010-09-24 13:28:01 +02:00
hjk
7504887377 compilation fix with namespaces 2010-09-23 15:41:20 +02:00
Christian Kamm
f8c5001382 Remove the QmlJSEditor dependency from Qt4ProjectManager.
The Qt4ProjectManager now uses metacalls to inform the QmlJSModelManager
about the project data.

Done-with: hjk
2010-09-23 14:16:46 +02:00
Christiaan Janssen
0bc0a2df5a QmlObserver: showing a warning when changes cannot be synchronized
Reviewed by:  Thomas Hartmann
2010-09-22 16:30:21 +02:00
Christian Kamm
c7b3e3c81c QmlJS: Speed up Link significantly, provide more info on imports.
Link now caches imports. That means importing the same library (say, Qt)
from more than one file no longer creates an importing namespace for
each one. Instead, a single one is created for the instance of Link.

To make this work, the type environment in ScopeChain has been given its
own type: Interpreter::TypeEnvironment. That has the added benefit of
being able to carry meta-information about imports. You can use
TypeEnvironment::importInfo(qmlComponentName) to get information about
the import node that caused the import of the component.
2010-09-16 15:51:21 +02:00
Christian Kamm
97c07292aa Qml: Make import classification in Bind less verbose. 2010-09-16 15:51:21 +02:00
Christian Kamm
8df6dd6d7d QmlJS: Add initial documentation for the base classes of the code model. 2010-09-15 15:26:34 +02:00
Roberto Raggi
ba03239749 Concate strings instead of using the QDir API to speed up the linking phase.
Reviewed-by: Christian Kamm
2010-09-08 15:13:12 +02:00
Christian Kamm
f3f3b96c85 QmlJS: Improve performance by avoiding two links in SemanticHighlighter.
Reviewed-by: Roberto Raggi
2010-08-31 10:39:07 +02:00
Christian Kamm
2e8ec2f9e6 QmlJS: Fix performance problem in Snapshot.
Don't use QMultiHash::values(key), it rebuilds the values list from
scratch for each lookup.

Reviewed-by: Roberto Raggi
2010-08-31 10:25:02 +02:00
Christian Kamm
88601712c6 QmlJS: Make ScopeChain more const-correct.
We don't want people modifying the shared component chain on a
const Context *.
2010-08-30 14:12:06 +02:00
Christian Kamm
32bb7bffc0 QmlJS: Add missing null checks before using scopeChain().qmlTypes. 2010-08-30 13:35:35 +02:00
Olivier Goffart
af01698cfc qmljsdelta: Fix updating property on UiObjectBinding 2010-08-27 17:15:21 +02:00
Tobias Hunger
715796b48a Fix krazy issues: Use explicit constructors
* Fix all warnings about non-explicit constructors except for those
   in 3rdparty code.
2010-08-27 12:10:29 +02:00
Christian Kamm
1a9c69ddb0 QmlJS: Fix crash when opening JS files.
Now that Contexts are cached, it needs to be copyable. However, the
ScopeChain has a QmlComponentChain member that owns resources and didn't
have a correct copy constructor or copy assignment operator.

I've made QmlComponentChain non-copyable and store a shared pointer to
an instance instead, as it will generally not change for a given
context.

Reviewed-by: Lasse Holmstedt
2010-08-27 09:42:07 +02:00