* parser side support for annotations, inline components, new UiVersion
and all the things included in QT 5.15 parser
* SourceLocation moved from QmlJS:AST to QmlJS
* Visitors now need to handle throwRecursionDepthError
* BaseVisitor for visitors that want to override all visit
Task-number: QTCREATORBUG-23591
Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
These changes are required for the new Binding Editor
Change-Id: Ic1e833819c69831aa1a930ab668a644ae4ccdd6f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We'd like to make use of it in a more general context, and it's not
directly related to QML.
Change-Id: I025ec67829f85544667684cdb8c99d1ee4c18197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And if multiple topics are found in the index, show the topic chooser
dialog that we already have for the help index.
Fixes: QTCREATORBUG-12704
Task-number: QTCREATORBUG-15959
Change-Id: I7afa6f44bbecc12f602aaaa4a11209ec72399689
Reviewed-by: David Schulz <david.schulz@qt.io>
If we are already passing a URL, we do not need to pass a map of URLs in
addition. We already know exactly which URL we want.
Change-Id: I955e03a611667733e9734e7996725d51857c71b1
Reviewed-by: David Schulz <david.schulz@qt.io>
No need for code duplication.
Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Users know if they have a URL or not, we should not guess (and then even
guess differently at different places)
Change-Id: Iaaf69a94baadbee0ff427a2bc9065b714dcf8478
Reviewed-by: David Schulz <david.schulz@qt.io>
The help system used to be confused by types from QtControls2, since
they have often the same name and version as the ones in QtControls.
This patch resolve the issue by looking for a number in the module
name, and then using the url found as helpId.
Task-number: QTCREATORBUG-16851
Change-Id: I48196d90b0fea5edf50751900864a39075894866
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
There's a bit too much unneeded flexibility in there, requiring extra
boiler-plate code on the user side.
Change-Id: I34d03838fb1cd3182fcbb93bf65158ebfc7e2bce
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
The editor factories are already a central place to associate
hover handlers with editors, no need to retrieve them later from
the object pool again. This also allows for easy handling of
more than one active handler per editor.
Change-Id: Ie716b96f5ce6b526ee897468635e03e909d81538
Reviewed-by: David Schulz <david.schulz@digia.com>
... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Merge editor files, sort #includes, namespaces.
This does not yet use the new editor construction scheme.
Change-Id: Idb1171389858c4470d7a4ec9441fb25e6d157400
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Moved Document::Language, Import::Type and StaticAnalysis::Severity
enums to qmljsconstants.h and renamed values removing the redundant
part.
Thus the effective length changed little or improved
(Document::QmlLanguage => Language::Qml).
The separate file allows better reuse of enum values without introducing
circular dependencies.
Change-Id: I5186d7c04f5d3f6c289068b919be5ff1ff118326
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Qmljs now keeps a cache of parsed qrc files, and can resolve "qrc:" links.
This breaks the assumption that the name that the qml files has on
the filesystem is the one that qml sees, and that contents of
directories can be found just looking at file whose path starts with the
directory path.
Currently the first file is used when multiple qrc files contain the same
path, but support for strict and weak path resolving is already there.
At the moment only qrc files for projects that call updateQmljsCodeModel
are updated.
ChangeLog: QmljsSupport: Imports using qrc links are resolved.
Task-number: QTCREATORBUG-8953
Change-Id: I695fac2692af2417d49c192c580a1c2e7b4873f4
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().
Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>
avoid using extra selections for warnings folding them into the
normal semantic update.
Extra selections impose a relatively large overhead (and need expensive
text cursor operations).
Unlike C++ Qml warnings are continuosly recomputed in the current file
of the editor, but not listed in the issue panel, unless one
explicitly triggers the qml checks.
Using the normal sematic update for warnings avoids QTextCursor
operations, and uses batched applies.
Unfortunately getting the tooltips from the additional formats instead
of using the extra selections requires private API, so Ranges are also
stored separately.
Change-log: [Qml/JS Support] Improved speed of QML/JS Editor for large files with lots of warnings.
Change-Id: I1f996231ef35d7cd77a79af58dbae2098fbbc83e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
QStringList::join only accepts strings, not chars in qt4
Change-Id: I8ad89420d618904e53d0bb08bb1c497995a744c4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Try harder to get help for types even if the parsing is almost
completely broken.
Task-number: QTCREATORBUG-3169
Change-Id: I013a0aa45c654570c88ef77564bed43727fce5fb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This patch prefers QML.moduleName1.2.Type as index for help.
The old rule is also supported for backwards compatibility.
Change-Id: I484399ac54f6ccb09938ef63e1e5b6845e5e8da5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>