aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-11-191-11/+0
|\ | | | | | | Change-Id: I1f547bbb03fb9ff8b41e6bd5495da0631e643265
| * AutoTest: Remove scenario testChristian Stenger2025-11-141-11/+0
| | | | | | | | | | | | | | | | This scenario does no more apply due to changed code inside handling of Qml/JS parsing. Change-Id: I4b526f6d88cdcf417799b61784a507014c56b4e9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Use QString::size() instead QString::length()hjk2025-11-1310-45/+45
| | | | | | | | | | | | | | Minor gain in debug builds and when stepping. Change-Id: I2540d309661e4babfd7331b068c17657ded2a098 Reviewed-by: David Schulz <david.schulz@qt.io>
* | QmlJSPluginDumper: Use FilePaths::watchEike Ziller2025-10-202-11/+21
| | | | | | | | | | | | | | | | to watch multiple files at once, which is much more efficient. Task-number: QTCREATORBUG-33523 Change-Id: I5e0b6e0c3fffc3692dedefbbc1882e89cb353d0d Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | qmljstypedescriptionreader: don't warn about missing type bindingSami Shalayel2025-10-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Adapt qmljstypedescriptionreader to its qtdeclarative counterpart and only warn about missing name bindings. This helps to mute lots of warnings of the type: .../qml/QML/jsroot.qmltypes:3399:9: Property object is missing a name or type script binding. that can't be fixed and that are actually totally fine. Task-number: QTCREATORBUG-33624 Change-Id: Icfe0a5fd4342cf8060fc1ff7e0f60f3914666467 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-10-132-5/+2
|\| | | | | | | Change-Id: I10f6f120cb43747fcb7684ab78c1e1d286bafbbc
| * qmljstypedescriptionreader: don't warn about missing type bindingv18.0.0-rc1Sami Shalayel2025-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt qmljstypedescriptionreader to its qtdeclarative counterpart and only warn about missing name bindings. This helps to mute lots of warnings of the type: .../qml/QML/jsroot.qmltypes:3399:9: Property object is missing a name or type script binding. that can't be fixed and that are actually totally fine. Don't change the actual warning because of string freeze. Fixes: QTCREATORBUG-33624 Change-Id: Ie0b7c32ff36ac585802fcca70ecd34e2a350786e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QmlLS: Avoid one use of HostOsInfo::isWindowsHost()hjk2025-10-131-4/+1
| | | | | | | | | | | | | | | | ... which would be wrong when used with a remote linux build device from a Windows host. Change-Id: I74430ae6dea05beac1eb543a58b30e0f6978dddd Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | qqmljscheck: don't mix ids between inline componentsSami Shalayel2025-10-092-0/+14
|/ | | | | | | | | | Ids can't leak out of inline components, so use different idStacks when looking at different inline components. Fixes: QTCREATORBUG-32418 Change-Id: Ia7d90951fd527433c6106fe5ef68b4ef1332f10c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmljsformatter: align behavior with qmlformatSemih Yavuz2025-10-081-1/+0
| | | | | | | Amends 10faa44b8d9c55f8a00656bf028a31d183e1cb54 Change-Id: Iaa32f0f0afae23b142edd6e79f25f2c8ecc92486 Reviewed-by: hjk <hjk@qt.io>
* qmljsreformatter: fix formatting of js class constructorSemih Yavuz2025-10-071-31/+62
| | | | | | | | | | | PatternProperty handling in the reformatter did not account for the different syntax used by class methods/getters/setters vs plain function definitions. Add method definition handler inspired from qmlformat. Fixes: QTCREATORBUG-33112 Change-Id: Ic4294caf7d45aba07dfe1f1cf1399fb95a06d0d3 Reviewed-by: hjk <hjk@qt.io>
* Use QStringList instead of QList<QString>Alessandro Portale2025-10-023-3/+3
| | | | | Change-Id: I56fabbfe32ab579ef5e9f7c8cc5fde220b99769a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Use Utils::FilePaths instead of QList<Utils::FilePath>Alessandro Portale2025-10-024-125/+125
| | | | | | | And remove unnecessary Utils:: for FilePath[s] in affected files. Change-Id: I3eba81519c22cded8a48a197c7b1a5d7835673f4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Merge remote-tracking branch 'origin/17.0'Eike Ziller2025-08-271-1/+2
|\ | | | | | | Change-Id: If7920935f5392f89bc7a70345db66df9e506f226
| * qmljs: avoid recursively loading the same libraryPathPhilip Van Hoof2025-08-211-1/+2
| | | | | | | | | | | | | | Change-Id: If3d28cf6da94652f3700c0bfb1713bc15a06337c Fixes: QTCREATORBUG-33228 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | FutureSynchronizer: Remove clearFutures()Jarek Kobus2025-07-311-2/+2
| | | | | | | | | | | | | | Instead, assign an empty FutureSynchronizer. Change-Id: I844546acab55b81ad2e660cd8a1efedba04bba69 Reviewed-by: hjk <hjk@qt.io>
* | QmlJS: Let plugin search depend on the build's devicehjk2025-07-251-27/+4
| | | | | | | | | | Change-Id: Id039e6aaab6f9529d869be0bf723a1eae90f0f4c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | QmlJS: Fix some file paths in a remote contexthjk2025-07-242-27/+25
| | | | | | | | | | | | | | | | | | | | FilePathification went too far here, dependencies are something like "QtQuick 2.0", i.e. true strings, not file paths. On the other hand, qmldirPluginPath _is_ a file path. Change-Id: I1600b060a23d1186442947efbbe3c26c6da5c74c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | QmlJs: Avoid [=] captureJarek Kobus2025-07-211-1/+1
| | | | | | | | | | Change-Id: If91b606ce8e38b0c73af090c5458a5230cd945b0 Reviewed-by: hjk <hjk@qt.io>
* | QmlJS: Remove a wrong use of FilePath::toUrlishString()hjk2025-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | For remote projects, this contains the scheme://host part, which would never be equal to the 'relatively local' ImportInfo::path() Change-Id: I6137bbc11c1d4c6a6cdd96dbe425e6a2d832e385 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* | Utils: Further FilePathification of QrcParserhjk2025-07-144-34/+32
| | | | | | | | | | Change-Id: I929d8c0b2890391fed32b6fd4aeb18d984ffe3a3 Reviewed-by: David Schulz <david.schulz@qt.io>
* | QmlJS: Code cosmeticshjk2025-07-144-70/+56
| | | | | | | | | | | | | | Namespaces, FilePaths, ... Change-Id: I6bee74ee4446bdd16ead9a1b4d0db34ed3fd9c7a Reviewed-by: David Schulz <david.schulz@qt.io>
* | QmlJS: Remove unused PluginDumper::m_qtToInfohjk2025-07-142-9/+1
| | | | | | | | | | Change-Id: I51cb83064e3755d6de104f49225579e31fecca36 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Utils: Partially FilePathify QrcParserhjk2025-07-141-5/+5
| | | | | | | | | | Change-Id: I60f203c27c3f76cafcee10917e11ed0f860e7a77 Reviewed-by: David Schulz <david.schulz@qt.io>
* | ProjectExplorer: Better separation between project managers and QmlJShjk2025-07-112-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, individual project managers depended on QmlJS, and for updates they pulled a pre-filled ProjectInfo struct from QmlJS, amended it, and pushed it back. In the new approach, indvidual project managers can add to a similar pre-filled structure from the buildsystem base implementation, after which the base implementation emits a signal containing the data, which is caught by QmlJSTool::ModelManager and there translated into QmlJS's own ProjectInfo struct. Advantage here is that the more of the necessary amending can be done centrally in the new BuildSystem::updateQmlCodeModel() and the indvidual project managers do not have to depend on QmlJS anymore. Change-Id: Ic3fbc55b9e3d980c55ac478bdf5672391214fa7b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Utils: Make FilePaths a full class instead of a QList<FilePaths> aliashjk2025-07-112-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Creates a natural place for named constructor and conversion functions. Api: Created Utils::FilePaths as full class instead of a QList<Utils::FilePaths> alias Api: Utils::FilePath::fromStrings -> Utils::FilePaths::fromStrings Api: Utils::FilePath::fromSettingsList -> Utils::FilePaths::fromSettings Api: Utils::toFilePathList -> Utils::FilePaths::fromStrings Change-Id: I1786519206dd1fb68f410d54ce77a0846dc1f9de Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/17.0'Eike Ziller2025-05-262-19/+31
|\| | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: If5ab8dda785255d168d7765f33da2b4fe3817183
| * QmlJS: Replace FileSystemWatcher with FilePathWatcherCristian Adam2025-05-222-19/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileSystemWatcher would create a map with the files and at insertion in the map it would do a file access. Move to have a map of FilePaths to FilePathWatchers, which would not do file access at map creation. This way of watching files is similar to what Core::DocumentManager is doing. This works way better. There is no freeze when a project using 500 qml plugins is loaded, and also when the project is rebuilt. Fixes: QTCREATORBUG-32209 Change-Id: Ia1be55e316f163a8c1059f40b855fbd6cbc06fdd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | Merge remote-tracking branch 'origin/17.0'Eike Ziller2025-05-222-33/+32
|\| | | | | | | Change-Id: I93e519a48455218307308c11c07642001b3cdcd6
| * QmlJS: Remove direct use of ProjectExplorer::Projecthjk2025-05-212-33/+32
| | | | | | | | | | | | | | | | Even if it's only used as a (mostly opaque) pointer, it's a dependency in the wrong direction. Change-Id: Ic53e3629bca73ddcd815097510ac74fd1aff53ba Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | QmlJS: Remove explicit dependency on Qt::XmlAlessandro Portale2025-05-212-2/+2
|/ | | | | | Change-Id: I18845f1080f0795caba9f201a2beafab87923c15 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* qqmljspropertyreader: use correct group property nameSami Shalayel2025-04-241-6/+7
| | | | | | | | | | | | | | | | Fix a bug where the wrong property name is used when inserting properties into m_astPropertyValues. This stops "Move Component into own file" from deleting user code because it can't find the property value. Amends 1ba0e5cdf954a53b383ae3fdcf47233e93d219e8. Fixes: QTCREATORBUG-32033 Change-Id: Idf6d04b55feb92adfb0627fdaf3c376967e49d9f Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Fix warning for ';'Marco Bubke2025-04-152-11/+11
| | | | | | | | The macro already contain a ';'. Removing the argument or [[maybe_unused]] would maybe even a better approach. Change-Id: I31750d10a4f252c667e7c0e5e13bf1085dbe11a2 Reviewed-by: hjk <hjk@qt.io>
* Replace most expected_str by Utils::Resulthjk2025-04-113-4/+4
| | | | | | | | Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QmlJS: FilePathify SemanticInfoUpdaterhjk2025-04-102-25/+22
| | | | | Change-Id: Ia083ee25e9156b9d0a5109ff35f13fd4aa28444c Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2025-04-031-1/+1
|\ | | | | | | Change-Id: I32c097041c1b1b33618c20651c265698d9e69208
| * QmlJS: Allow blocks in TimelineAnimationThomas Hartmann2025-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | We add signal handlers to TimelineAnimation since QDS 1.0. We normalize those handler with braces and this should continue to work. Task-number: QDS-15014 Pick-to: qds/4.7 Change-Id: Ib7a354d0e25a087aabe690ebda66f131b579d666 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | qmlformatsettings: introduce qmlformat process wrapperSemih Yavuz2025-04-032-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need qmlformat process to create default options to be displayed in the preferences widget. It will also be invoked when reformat action is requested. By design, the latest qmlformat version found in the system will be used. Task-number: QTCREATORBUG-26602 Change-Id: I98c435d8941d4cdf9fcd8fbdcdcb1c05931174e7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | QmlJS: Let QJson parser handle \r in JsonCheckhjk2025-04-021-5/+2
| | | | | | | | | | | | | | It's prepared for that, and we can avoid the effort in FileReader::text() Change-Id: If6432f1fc14c1bba4dac4845ce77d5c4cf8e1755 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QmlJS: Let the tokenizer handle \r in the plugin dumperhjk2025-04-021-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The lexer is robust enough. This avoid the copy in FileReader::text(), which then means the FileReader can be a simple FilePath::fileContents(). As drive-by, replace the use of FilePath::toUrlishString by the here better fitting toFSPathString(). Change-Id: I5915316ee9c88f6110669106a314252384bad41c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Avoid potential detach of non-const Qt containers in range-loops 1/2Alessandro Portale2025-03-215-11/+11
| | | | | | | | | | | | | | By making the containers const. Change-Id: I3095d7c817bd8a9cc40184aba144d617c6071f97 Reviewed-by: hjk <hjk@qt.io>
* | QtC: Refactor QmlJS::IconsDmitrii Akshintsev2025-03-202-74/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation before using this refactored Icons::Provider class in the QmlLSClient for providing the same icons in the outline as it is provided currently by the QmlOutlineModel The motivation behind this refactoring is the following: 1. Simplify memory management of Icons entity (using modern Meyers Singleton) 2. Encapsulate and group Loading(parsing) and querying of icons in one entity (IconsStorage). 3. Make explicit that the loading of icons happens only once at the construction and stays immutable. 4. Extract free functions Commenting a bit more on the 2nd, Previously, the caller had to be aware of package names and the internal icon storage structure, leading to hardcoded package names and two queries at the caller site. The current approach encapsulates this logic, bringing it closer to parsing/loading, ensuring a single entity manages both folder structure and query schema. While this adds complexity (e.g., storing m_packageNames), it avoids duplicating knowledge. Given that WebKit contains only one icon, a simpler <typeName, QIcon> mapping could suffice. However, for now, the more generalized approach is retained. Task-number: QTCREATORBUG-31767 Change-Id: I073eaa82f1bc912ce7b40e3353aba23ddfcf8f4c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | Utils: Convert FileSystemWatcher signals to FilePathhjk2025-03-142-3/+3
|/ | | | | | Task-number: QTCREATORBUG-26870 Change-Id: Ida2e2664a4944e139f1a667928978f521ff9cd1f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* QmlJS:: Fix values in pragma statements when reformattingThomas Hartmann2025-02-271-0/+4
| | | | | | Task-number: QDS-9732 Change-Id: Ia3ca22b4a26aef8ac8ffef4fb50a45bdb0e072f8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlJS::Check: Suspend warnings for ScriptAction defined in the .ui fileRafal Stawarski2025-02-203-14/+23
| | | | | | | | | | Connections were the only type that was allowed to have function definitions, call expressions, etc. in the .ui file. It's now extended with ScriptAction. Task-number: QDS-10449 Change-Id: If55116a291c5c1d6441f6ab0c3a651861da69fba Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Editor: Make braceDepth an explicit member in TextBlockUserDataDavid Schulz2025-01-201-2/+2
| | | | | | | | | | ... instead of merging this information together with other unrelated information into the QTextBlock::userState. This removes the undocumented bit operations done on the userState and make the code more readable. Change-Id: Iae6b27298245c0191d6337ddf6c20aa30d1afcb3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlJS: Silence c++20 warningChristian Stenger2025-01-152-4/+4
| | | | | | | | On older macOS SDKs the missing const ends up in a warning regarding ambiguous reversed operators. Change-Id: Ic71e68e2360ff60326746a2aea599ffe8969fc99 Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FilePath::toString() into toUrlishString()hjk2025-01-105-18/+18
| | | | | | | | | | | | | | | | toString() is almost always the wrong conversion, but unfortunately too easy to find and often even working at least for local setup. This here raises the bar as the non-availability of the "obvious" toString() hopefully helps people to think about the semantics of the needed conversion and choose the right toXXX() function. The chosen new name is intentional ugly to reduce the likelihood that this (still almost always wrong) function is used out of convenience. Change-Id: I57f1618dd95ef2629d7d978688d130275e096c0f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2025-01-062-0/+7
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/templates/wizards/projects/qtquickuiprototype/wizard.json src/libs/sqlite/sqliteids.h src/plugins/effectcomposer/effectshaderscodeeditor.cpp src/plugins/qmldesigner/qmlpreviewplugin/qmlpreviewactions.cpp src/tools/tools.qbs Change-Id: Ia89da2e6704c10f91f4066210cddd1f3239e85b9
| * QmlDesigner: Wait until ModelManagerInterface is finished when loadingThomas Hartmann2024-12-162-0/+7
| | | | | | | | | | | | | | | | | | This is usually the case when opening the first file and will take about a second. This makes incomplete types a lot more improbable. Change-Id: Ie3b545283f531f362cacbeb66ec1d2d30e619566 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>