- 17 Jun, 2014 3 commits
-
-
Denis Steckelmacher authored
ParseSession parses names like "QtQuick_2.2.qml" and "MyModule.qml" and has methods to get the module name (QtQuick and MyModule) and its version (2.2 and 1.0)
-
Denis Steckelmacher authored
Name code-completion test-files testX.qml instead of test_X.qml in order not to break the future module versioning This commit also adds a DUChainReadLock that was missing
-
Denis Steckelmacher authored
A stack of booleans allows endVisit(UiObjectDefinition) to know if a declaration has to be closed. Module {} declarations are now skipped (but their content is explored), and all the import logic is greatly simplified (no need for namespace aliases). This is mostly a cleanup commit: namespaces didn't add anything useful and were very complex to handle.
-
- 16 Jun, 2014 3 commits
-
-
Denis Steckelmacher authored
C++ wrappers (QDeclarativeItem, etc) cannot be instantiated in a QML component, they can only be used in Javascript snippets.
-
Denis Steckelmacher authored
If a directory contains A.qml and B.qml, A.qml should be able to see B (the top-level component of B), but has no use of all the imports of B. This also avoids the duplication of declarations (A imports B which re-imports A, every declaration now appears two times).
-
Denis Steckelmacher authored
If a QML is in the same directory as .cpp files and a CMakeLists.txt, it doesn't make sense that it sees all the top-level declarations of those files.
-
- 15 Jun, 2014 1 commit
-
-
Denis Steckelmacher authored
This allows QML files to instantiate custom QML components and JS files to use the functions and variables of other files. REVIEW: 118743
-
- 14 Jun, 2014 1 commit
-
-
Denis Steckelmacher authored
Export QDeclarativeGraphicsWidget (inheriting from QGraphicsWidget) as GraphicsWidget, not QGraphicsWidget This prevents QDeclarativeGraphicsWidget from inheriting from itself.
-
- 13 Jun, 2014 1 commit
-
-
Denis Steckelmacher authored
REVIEW: 118700
-
- 12 Jun, 2014 1 commit
-
-
Denis Steckelmacher authored
Nearly every visit() method created an ExpressionVisitor and used it to find the declaration corresponding to an expression. Now all this code is factorized, which ensures that UseBuilder recognizes the exact same expressions as ExpressionVisitor. New kinds of expressions need now only to be supported by ExpressionVisitor.
-
- 11 Jun, 2014 2 commits
-
-
Denis Steckelmacher authored
openDeclaration() is the only call that needs the injected context, and this avoids bugs if openContext() is called in an injected context. For instance, QML component subclasses were broken because a context was injected and not closed before openContext() was called. The sub-context had therefore the wrong parent context.
-
Denis Steckelmacher authored
Ensure that getDeclaration and the code-completion can find declarations independently of their position in a QML file QML and Javascript are highly dynamic languages and most of their declarations can be used before the declaration itself. Now that the parser does two parsing passes, this commit ensures that the location of an use is completely ignored and that the parser always sees the complete list of declarations in a context.
-
- 09 Jun, 2014 8 commits
-
-
Denis Steckelmacher authored
typeFromClassName also returns the type of a declaration if the declaration is an instance. Therefore, typeFromClassName("font") returns the type of the "font" property, thus Font, and pixelSize and b are properties of Font.
-
Denis Steckelmacher authored
"onWidthChanged: console.log(value)" and "Component.onLoad: doSomething()" are now both supported.
-
Denis Steckelmacher authored
Signal declarations in plugin.qmltypes files must have an internal function context for their parameters to be visible in their slots.
-
Denis Steckelmacher authored
ExpressionVisitor and UseBuilder now recognize "anchors.parent" as being an use of the "parent" member of "anchors"
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
Use injectContext instead of Declaration::setContext so that ContextBuilder can keep track of the declarations encountered in a context This avoids moved declarations from being deleted by the DUChain cleanup logic because they are declared in a context in which they don't appear afterwards.
-
- 08 Jun, 2014 7 commits
-
-
Denis Steckelmacher authored
This will also allow uses before definitions in QML but some other problems first need to be solved.
-
Denis Steckelmacher authored
Update the unit tests now that enumerations are correctly handled, and don't use not-yet-upstreamed features The previous commit should have been named "Declare enumeration values in the enumeration itself, not in a sub-context, and set the propagateDeclarations flag of enumerations".
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
"onTest: foo" is invalid but "foo" is valid and can be used to provide code- completion items.
-
Denis Steckelmacher authored
"onTest: foo" is invalid but "foo" is valid and can be used to provide code- completion items.
-
Denis Steckelmacher authored
When providing completions for script bindings, don't propose script bindings for properties/signals of the surrounding components While a QML component can access the properties of its surrounding components in a Javascript function or a script binding, it would have no meaning for it to assign a script binding to a property of one of its surrounding components. Label { Button { elide: // Huh? Button musn't see the "elide" property of Labem } }
-
Denis Steckelmacher authored
This avoids a race condition where the background parser queue becomes empty, testFiles stops waiting, but an asynchronous job somehow manages to refill the queue. The greater delay does not slow down the tests, there a just less iterations of the waiting loop executed.
-
- 07 Jun, 2014 7 commits
-
-
Denis Steckelmacher authored
Builtin QML modules are not imported automatically, so import them as dependencies to other QtQuick modules
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
UiPublicMember has a field that can be used to know whether the type of the property has to be wrapped in an array.
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
Ensure that the last declaration of ExpressionVisitor is cleared if no pertinent declaration has been found For instance, when the declaration of an object member cannot be found, ensure that ExpressionVisitor will return nothing, and not the declaration of the object. "foo" in "object.foo" is not an use of "object" if "foo" does not exist in "object".
-
Denis Steckelmacher authored
REVIEW: 118600
-
- 06 Jun, 2014 6 commits
-
-
Denis Steckelmacher authored
-
Denis Steckelmacher authored
This prevents variables declared in one block to become visible to the other blocks. Item { onFoo: { var a; } onBar: { a = 2; // this is not onFoo.a } }
-
Denis Steckelmacher authored
Revert "QML components can only see declarations in their context, their imported parent contexts and the top-level context" This reverts commit 4cbe87a9. QML components can see their parents, I should have tested in QtCreator. Conflicts: codecompletion/tests/qmlcompletiontest.cpp duchain/declarationbuilder.cpp tests/files/test.qml
-
Denis Steckelmacher authored
REVIEW: 118596
-
Denis Steckelmacher authored
When the user selects a QML signal in a QML component context, code-complete it using its corresponding slot. In "Item { | }", "changed" is displayed as "onChanged", and selecting this completion item inserts "onChanged: " in the code.
-
Denis Steckelmacher authored
In a QML component, this changes "col|" to "color: " and "property col|" to "property color" (without the colon). This also works in Javascript object literals, but this is not really useful there (but not wrong).
-