Commit Graph

140 Commits

Author SHA1 Message Date
Christian Kamm
0194da7300 Qml-C++: Find C++ qmlRegisterType calls and populate QML code model.
Reviewed-by: Erik Verbruggen
2011-01-04 15:58:22 +01:00
Christian Kamm
5de7be5f91 LanguageUtils: Add FakeMetaObject and ComponentVersion. 2011-01-04 15:58:21 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +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
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
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
Thomas Hartmann
f6fb0d82ed Test: Extend QmlJS code model test. 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
Tobias Hunger
cf3a418cd8 Fix spelling in comments
Krazy was complaining about those.
2010-11-03 12:45:34 +01: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
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
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
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
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
Christian Kamm
87e04df257 QmlJS: Refactor LookupContext creation for speed.
* If possible, create LookupContexts through SemanticInfo; it caches the
  linked Context and will be faster.
* Contexts now own their Engine.

Reviewed-by: Lasse Holmstedt
2010-08-26 11:34:29 +02:00
Christian Kamm
898098c1f2 QmlJS: Allow lookups on const Contexts. Pass const Contexts where ok.
In preparation for caching Contexts.

Reviewed-by: Erik Verbruggen
2010-08-25 11:53:23 +02:00
Christian Kamm
4ecf0349c5 QmlJS: Make 'follow symbol' work on JS functions.
Task-number: QTCREATORBUG-1757
2010-07-16 10:50:28 +02:00
con
ede2a7c975 Merge remote branch 'origin/2.0'
Conflicts:
	doc/qtcreator.qdoc
	share/qtcreator/gdbmacros/dumper.py
	src/libs/qmljs/qmljs-lib.pri
	src/plugins/debugger/breakhandler.cpp
	src/plugins/projectexplorer/projectexplorer.h
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
2010-06-30 14:25:09 +02:00
Christian Kamm
4271d2a21f QmlJS: Make the qml instantiating component chain more useful.
By actually storing the documents instead of only the root and id
environments.
2010-06-25 17:10:14 +02:00
Christian Kamm
123607ad70 QmlJS: Make variables in imported JS documents show up in completion.
Filtering them out has long since become unnecessary. It was used back
when JS files were sourced from Script elements - there they'd only
make the functions available. Now functions and variables are imported.

Task-number: QTCREATORBUG-1735
Reviewed-by: Erik Verbruggen
2010-06-25 13:34:45 +02:00
con
b0040dc858 Merge remote branch 'origin/2.0'
Conflicts:
	src/plugins/projectexplorer/taskwindow.cpp
	src/shared/proparser/profileevaluator.cpp
2010-06-10 15:00:16 +02:00
Christian Kamm
45415783e7 QmlJS: Get rid of xml file describing qml builtin types.
The type information is now generated at runtime.
2010-06-10 11:33:04 +02:00
Christian Kamm
e307bc2506 QmlJS: Store plugin metatypes in LibraryInfo. Rework type loading. 2010-06-09 14:36:54 +02:00
Christian Kamm
fa79add293 QmlJS: Check for existance of qmldump binary before using it. 2010-06-09 14:36:54 +02:00
Christian Kamm
f9d7872761 QmlJS: Use ComponentVersion everywhere. 2010-06-09 14:36:53 +02:00
Christian Kamm
822520c304 QmlJS: Get at types defined in plugins by running qmldump on them.
Task-number: QTCREATORBUG-1021
Reviewed-by: Roberto Raggi
2010-06-09 14:36:53 +02:00
Christian Kamm
313d30654e QmlJS: Avoid infinite recursion when encountering property loops.
Such as
property int foo: bar
property int bar: foo.

Task-number: QTCREATORBUG-1389
Reviewed-by: Roberto Raggi
2010-06-08 15:37:16 +02:00
Christian Kamm
3b8b6e89cc QmlJS: Autocomplete dot and colon for properties.
Reviewed-by: Roberto Raggi
2010-06-07 17:37:45 +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
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
fadfe9c64e QmlJS: Generalize EasingCurve name check to all enums.
Reviewed-by: Erik Verbruggen
2010-05-19 12:24:32 +02:00
Christian Kamm
0e12240613 QmlJS: Completion for enums.
Done-with: Erik Verbruggen
2010-04-29 16:05:25 +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
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
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
Erik Verbruggen
b71d3eb145 Added defaultProperty attribute reading and storing. 2010-04-06 09:38:40 +02:00