aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools
Commit message (Collapse)AuthorAgeFilesLines
* QmlJsTools: Fix warninghjk2025-11-211-7/+10
| | | | | | | | | | | | qmlformatsettingswidget.cpp: In lambda function: qmlformatsettingswidget.cpp:507:19: warning:implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated] qmlformatsettingswidget.cpp:507:19: note: add explicit 'this' or '*this' capture Plus some cosmetic changes where I couldn't resist. Change-Id: Icf48e76083c0e22358bf638edebd9abbc1ac51eb Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Xavier BESSON (Personal) <developer@xavi-b.fr>
* Add a deploy button in qmlls/qmlformat settingsXavier BESSON2025-11-201-3/+29
| | | | | | | | | | The deploy button allows to write or overwrite a .qmlformat.ini into the current project root folder. It will contain the current qmlls/qmlformat options. Change-Id: I809af9e978190abb3cae88cf7df92d165bdb5367 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-11-112-16/+15
|\ | | | | | | Change-Id: I62172e37318c05e871c1b73997c99eb107667734
| * ProjectExplorer: Return early from gatherQmlCodeModelInfo()hjk2025-11-111-12/+12
| | | | | | | | | | | | | | | | | | ... when no qml files are present in the project. Task-number: QTCREATORBUG-33723 Task-number: QTCREATORBUG-33715 Change-Id: I1416c80140b902784cfa57c05b0bffaebd0480a1 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| * QmlJSTools: Don't guess project in updateDefaultProjectInfo()hjk2025-11-112-8/+7
| | | | | | | | | | | | | | | | | | Preparation for actual changes. Task-number: QTCREATORBUG-33723 Task-number: QTCREATORBUG-33715 Change-Id: Id98a1ad400139d8dad71fe9f6a9153e114a964c0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Fix some warnings about unused return valuesChristian Kandeler2025-11-051-1/+1
| | | | | | | | | | Change-Id: Id479348a96c84aa3689f055464001a44aa1d4919 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | QmlJSTools: Fix build with Qt6.5Christian Stenger2025-11-051-4/+4
| | | | | | | | | | | | | | | | | | ...and silence a compiler warning. Amends dd70e032f52f59c6968759c1bde36bb3f9e2124c. Change-Id: Ie3e29662a50a43114de1b45a92441d2d3c358d5d Reviewed-by: Xavier BESSON (Qt) <xavier.besson@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | Put qmlformat LSP options in a table viewXavier BESSON2025-11-031-17/+549
| | | | | | | | | | | | Fixes: QTCREATORBUG-33305 Change-Id: Idf1607aeeeaaa8bfec6d02a0fd4f73ce1114bd85 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* | TaskTree: Switch to qt-ified QtTaskTreeJarek Kobus2025-10-311-1/+1
| | | | | | | | | | | | | | Remove the old Tasking lib. Change-Id: Iacb4939cc873e25d6039efae7dd23510a7baa5f9 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-10-211-4/+5
|\| | | | | | | | | | | | | Conflicts: src/plugins/docker/dockerdeviceenvironmentaspect.cpp Change-Id: Ic381a75d91e71626af28fec2ab155117a4fdff3a
| * QmlJSTools: Avoid crashChristian Stenger2025-10-211-4/+5
| | | | | | | | | | | | | | Guard connect and add an inner safety net as well. Change-Id: Ifccbc69063a85045157f0af9b736aea3454a96f3 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-10-132-15/+19
|\| | | | | | | Change-Id: I10f6f120cb43747fcb7684ab78c1e1d286bafbbc
| * QmlJSTools: Fix nodiscard warning with Qt 6.10Orgad Shaneh2025-10-131-15/+16
| | | | | | | | | | | | | | qmlformatsettings.cpp(151): warning C4834: discarding return value of function with [[nodiscard]] attribute Change-Id: I5505edfe11ff9622a577cb841b199bc70fac1ff1 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
| * Qmake: Reset QML code model after successful buildhjk2025-10-131-0/+3
| | | | | | | | | | | | | | | | | | Contrary to the first attempt to fix the issue, this here triggers the code model update asyncronously. Fixes: QTCREATORBUG-24428 Change-Id: I0ca22f1d2387a325173ebe65e17615994551f49d Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | Style Settings: Make Code Style preview more obviousMarcus Tillmanns2025-10-093-4/+23
| | | | | | | | | | | | Fixes: QTCREATORBUG-32956 Change-Id: I55aa01e7421cb1633072b046d2b4c42a2ce8a3cd Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-10-071-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/plugins/cppeditor/quickfixes/insertfunctiondefinition.cpp Change-Id: I3eda9d0b689958b5471f64eb622c7411f9661d57
| * Use Utils::FilePaths instead of QList<Utils::FilePath>Alessandro Portale2025-10-021-1/+1
| | | | | | | | | | | | | | And remove unnecessary Utils:: for FilePath[s] in affected files. Change-Id: I3eba81519c22cded8a48a197c7b1a5d7835673f4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | QmlJsTools: Move QmlFormatSettingsWidget definition to ,cpphjk2025-09-153-24/+29
|/ | | | | | | | Makes "visible" interface smaller. Change-Id: If408cfa612f44aab1da132fac7363d38673f15e3 Reviewed-by: Xavier BESSON (Personal) <developer@xavi-b.fr> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* TextEditor: Use toMap(Store &) for tab and style settingshjk2025-08-262-9/+7
| | | | | | | Babystep towards aspectification. Change-Id: I21891d88b40a82c96c8f273dda38f2f5b931f9f6 Reviewed-by: David Schulz <david.schulz@qt.io>
* QmlJSTools: Simplify QmlFormatSettings a bithjk2025-08-262-104/+55
| | | | | | | | | | We might need this per-(build-)device. So wrap all transient bits in QmlFormatProcess wrapper. Drop some indirections and adjust some namespacing. Change-Id: I77637f63314457a369d56266298a649d13d29374 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* QmlJSEditor: Don't look for qmlls and qmlformat on remote installationshjk2025-08-251-0/+3
| | | | | | | | | | | | | | | | | | | There presence is fairly expensive to evaluate, and this currently happens synchronously for all Qt versions on Creator startup. It's also not quite clear whether in case of a remote qmlls with a higher version than the locally available ones the remote one would be preferable, as there's also a significant run time overhead when using. In principle, this could be made working. For a proper solution we'd need one qmlls per configured (build) device, not a single global one. Since we are nearing QtC 18 feature freeze, but for pretend that there's no qmlls for remote builds (yet). Change-Id: I90ba09528688f65297a8df2d88a0e3306d556949 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* Improve preview text for qmlformat SortImports and SemicolonRuleXavier BESSON2025-08-251-1/+7
| | | | | | | Fixes: QTCREATORBUG-33306 Change-Id: I3367d22c02c4231f94a89c870663476519507c89 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* Improve preview text for qmlformat settings FunctionsSpacingXavier BESSON2025-08-251-1/+10
| | | | | | | Fixes: QTCREATORBUG-33299 Change-Id: I04dff35479af7122ab5ca2e6d7320ab037a71b36 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlJsTools: Remove an unneeded connection in QmlFormatSettingshjk2025-08-252-3/+2
| | | | | | | Call the only receiver directly. Change-Id: I4edca89736100e22a371e7b35cbfffc415d442f1 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* ProjectExplorer: Separate 'Source', 'Build' and 'Run' toolshjk2025-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | Tools, also such on "devices" like docker operate in different contexts, some work on the device directly when building on this device (qmake, ...), some when things are run on this device, and when (later) collecting e.g. (more) Qt versions it's necessary to distinguish between versions meant to run on a certain device or meant to be used for building for a (possibly different) device. I think it makes sense to separate these concepts also visually (and perhaps later also filter out e.g. build stuff from devices that will never used to build) I've included also "Source" as processing sources does not necessarily need a full build setup so it feels different, too, and was easy to add. Might be over-engineered. Change-Id: Ie6d86746b75274d82cef8f3378aadc8f9226f1a6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Add convenience functionality for traveling up the FS hierarchyChristian Kandeler2025-08-061-9/+3
| | | | | | | | This is a common operation, e.g. for locating config files. No need to rewrite the loop every single time. Change-Id: I31c3649852d82a24104ec1665fceec3a6073051f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* ProjectExplorer: Make device tool path list extensiblehjk2025-08-052-7/+23
| | | | | Change-Id: I54ec9f11f92009fae70d0f97b70e8f2ba01c02ea Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* QmlJsEditor: Use more contemporary settings setup patternhjk2025-07-254-38/+39
| | | | | Change-Id: Ic2303d6e7ccf6418e31c657352b09e7cf69011f7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Avoid QtTest module importsChristian Stenger2025-07-181-1/+1
| | | | | | | | | ...as module imports pull in all headers of the module including all headers of modules they depend on. See discussion around QTBUG-88831. Change-Id: I8aaffa74bf813031156d6e61d5bba9a0972b7ba0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/17.0'Orgad Shaneh2025-07-131-0/+2
|\ | | | | | | Change-Id: I3fdbfbe6f33431096e25f2ce1a5bab685d925fde
| * QmlJSTools: Fix buildEike Ziller2025-07-081-0/+2
| | | | | | | | | | | | | | | | | | Add missing <queue> include Amends 45c554d085bc575d09c40110ef602853270396cd Change-Id: I6f45aebf550361a98eed7142858c461cec61f65a Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* | ProjectExplorer: Better separation between project managers and QmlJShjk2025-07-112-203/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QmlJSTools: Rename qmljscodestylesettingspage.cpphjk2025-07-093-2/+2
| | | | | | | | | | | | | | | | | | ... to qmljscodestylesettings.cpp Matches the header now again. Change-Id: I80e6d41cd8cc7128a7578db005ddb505692d8aa5 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | QmlJSTools: Lump qmljscodestylesettings* togetherhjk2025-07-098-154/+125
| | | | | | | | | | | | | | | | | | | | | | | | Will help to isolate code later. For now, keep merge headers into qmljscodestylesettings.h and implementation into qmljscodestylesettingspage.cpp to keep diff small. Next change will rename qmljscodestylesettingspage.cpp to qmljscodestylesettings.cpp. Change-Id: Ib598a6a98ce43675edfd0bb53fd177e62de7c9da Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Utils: Introduce TemporaryFile::filePath()hjk2025-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | And deprectate the inherited fileName(). TemporaryFile::fileName() is one of the remaining "sources" of non-FilePath file paths, and it is at least imaginable to also use temporary files on remote devices. Change-Id: I0f18a0227171e6ea2c2f4d498142ae9e82f9a07b Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/17.0'Eike Ziller2025-07-081-4/+42
|\| | | | | | | | | | | | | | | Conflicts: src/libs/utils/textfileformat.cpp src/plugins/git/gitclient.cpp Change-Id: I502ca9c1ec28c1df9988ec9fa2ed5949bc45f615
| * qmljsmodelmanager: limit search for .qrc filesSami Shalayel2025-07-081-4/+40
|/ | | | | | | | | | | | | | | | | | | Instead of iterating over all files in the applicationDir, stop after a fixed amount of files to avoid Qt Creator from freezing. This amends the search introduced by 8592b5cb60f7ec9909e698545959c0e214fc5480. Abort the search after iterating through 8000 files, which lasts ~500ms on my machine. A separate commit in dev will add settings to change the max amount of files to search, in case projects are so big that they require more searching in terms of time. Fixes: QTCREATORBUG-33103 Change-Id: Ic15aa3458d0caf35d132a09fd1e86506cc3fa851 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: hjk <hjk@qt.io>
* qmljsmodelmanager: don't recurse into symlinksSami Shalayel2025-07-031-1/+1
| | | | | | | | | | | Ignore symlinks when looking for .qrc files, as those might actually be recursive and lead to infinite iteration, for example when the link links to .. or another parent directory of the current one. Task-number: QTCREATORBUG-33103 Change-Id: I9d59b632f5f5c7f9bda8a59eafc1d7f8891437d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: hjk <hjk@qt.io>
* qmlformat: fix previewSemih Yavuz2025-05-271-0/+1
| | | | | | | | | | | qmlformat uses default tab width is 4 while TabSetting class uses 8. This caused preview to display deeper indent than the actual formatter have. Fixes: QTCREATORBUG-32951 Fixes: QTCREATORBUG-32963 Change-Id: Idafd86819ee5c48e8899d74b23a589a8ae799ddc Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* qmlformat: use the highest-precedence ini fileSemih Yavuz2025-05-231-1/+1
| | | | | | | | | | | | | | | As of qtdeclarative commit d2e1fb2997527d6a4d31fb203bd98a9b73002555, `.qmlformat.ini` takes precedence over `qmlformat.ini`. If both files exist, the formatter may ignore the settings shown in the Qt Creator preferences and use the other file instead. This change ensures that the configuration shown in Qt Creator matches the one actually used by the formatter.qmlformat: use the most precedent ini file Task-number: QTCREATORBUG-32951 Task-number: QTCREATORBUG-32963 Change-Id: Icbcb2c0890b2909d4b0fdfdb749445ecf8e6b6a3 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlJS: Remove direct use of ProjectExplorer::Projecthjk2025-05-213-23/+31
| | | | | | | | 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>
* Docker/Process/QmlJS: Add some guardsEike Ziller2025-05-151-10/+16
| | | | | | | | | This works around a crash that currently happens on startup when Boot2Qt is installed on macOS (or probably any other Docker based setup). Task-number: QTCREATORBUG-32960 Change-Id: Icc99dfb6ebf1d738a1d4fde1605370de24736a8b Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Various UI text fixesEike Ziller2025-05-141-14/+8
| | | | | | | Fixing case, missing full stops, quotes, etc Change-Id: I0dc1064de0abe73b6a4ff95c81dcf88009057989 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QmlFormatSettings: Don't leak QTemporaryDir and QmlFormatProcessJarek Kobus2025-05-132-27/+34
| | | | | | | Amends 74ec1ca2bf1c19de9abbf1b60ff1348d4868488e Change-Id: Ib6007a8e05dd5f61c457943a8a0a7c579713f802 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* QmlJsTools: Avoid reading file contents twiceJarek Kobus2025-05-131-2/+2
| | | | | | | | Amends a7e5b68bed194d603bd6adc767ac335146b5b7f7 Change-Id: I7b5b9eb7e919dcd3ad48f250ee69087110b374b8 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
* qmlformat integration: write warnings in silent modeSemih Yavuz2025-05-021-4/+8
| | | | | Change-Id: Ie102c6cc2b03f7a4ba4c87893008fdf61c0a02ed Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJSTools: Fix qbs buildChristian Kandeler2025-04-141-1/+9
| | | | | Change-Id: Ia46104897a93a9c8fe9de6b2072a537c81b968cd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJSTools: Compile fixhjk2025-04-141-1/+1
| | | | | | | Amends a7e5b68be. Change-Id: I3efc5464f8347855c24df438ec77711102902484 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* integrate qmlformat and improve formatter settings UXSemih Yavuz2025-04-1417-173/+719
| | | | | | | | | | | | | | | | | | | | | | | | - Add reformat action to trigger full document formatting via qmlformat - Integrate reformat action into context menu and qmljstools menu - Remove custom formatter command from preferences, default to qmlformat when LSP formatting fails - Group tabSettings and other options under 'Built-In Formatter Settings' for clarity - Move formatter selection to Code Style page with a new radio button for selection - Ensure preview updates according to the selected formatter - Populate qmlformat configuration widget automatically for Qt's built-in code style option by running qmlformat --write-defaults. - TabSettings is a data structure being considered by the text editor while rewriting the formatted data. Overwrite tabSettings with the values in the .qmlformat.ini. - fix the issue of builtin formatter being not respecting the current codestyle's tab settings. Task-number: QTCREATORBUG-26602 Change-Id: I2ec1b4a69712eedfafab358aaabb25c6b43ffa8e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlJsTools: Use static setup pattern for QmlJSFunctionsFilterhjk2025-04-107-319/+294
| | | | | Change-Id: Ia7dd24fe641738c5ffb457b5d80821e99d6ad6ad Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>