aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools
Commit message (Collapse)AuthorAgeFilesLines
* qmlformat integration: write warnings in silent modeSemih Yavuz12 days1-4/+8
| | | | | Change-Id: Ie102c6cc2b03f7a4ba4c87893008fdf61c0a02ed Reviewed-by: Christian Stenger <[email protected]>
* QmlJSTools: Fix qbs buildChristian Kandeler2025-04-141-1/+9
| | | | | Change-Id: Ia46104897a93a9c8fe9de6b2072a537c81b968cd Reviewed-by: Christian Stenger <[email protected]>
* QmlJSTools: Compile fixhjk2025-04-141-1/+1
| | | | | | | Amends a7e5b68be. Change-Id: I3efc5464f8347855c24df438ec77711102902484 Reviewed-by: Christian Kandeler <[email protected]>
* 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 <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* QmlJsTools: Use static setup pattern for QmlJSFunctionsFilterhjk2025-04-107-319/+294
| | | | | Change-Id: Ia7dd24fe641738c5ffb457b5d80821e99d6ad6ad Reviewed-by: Jarek Kobus <[email protected]>
* QmlJSTools: Fix include and qbs buildChristian Stenger2025-04-041-2/+2
| | | | | | | Amends e6550c19fe2339672e410af72f974272afe8649d. Change-Id: I4b95054eedc16b3d0a5a2f8ba27679dc6095a3e1 Reviewed-by: David Schulz <[email protected]>
* qmlformatsettings: introduce qmlformat process wrapperSemih Yavuz2025-04-033-0/+265
| | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: hjk <[email protected]>
* QmlJSTools: Move qmljscodestylepreferencesfactory* to only userhjk2025-04-035-149/+113
| | | | | Change-Id: I383cbc0c1b88a1a612e629d4c13147b3e0b744d1 Reviewed-by: Jarek Kobus <[email protected]>
* QmlJSTools: Simplify setup of QmlJSFunctionsFilterhjk2025-04-025-17/+13
| | | | | Change-Id: I7f1692eedc4d2b9fc0e112371444a430f4bbff21 Reviewed-by: Jarek Kobus <[email protected]>
* QmlJSTools: Remove unused codehjk2025-04-021-9/+0
| | | | | | | Dates back to 2010. Change-Id: I044b1f2123e976fcca21a102c67643f32d81077c Reviewed-by: Jarek Kobus <[email protected]>
* Editor: move block related infos out of the layoutDavid Schulz2025-04-011-9/+6
| | | | | | | | | | All the static TextDocumentLayout functions operating on block user data are not related to the TextDocumentLayout. So move them to the TextBlockUserData and replace the member functions there with the static functions from TextDocumentLayout. Change-Id: Ief34a0dfce5917f064e5d06e661f2111f87f0aa7 Reviewed-by: Christian Stenger <[email protected]>
* Merge remote-tracking branch 'origin/16.0'Eike Ziller2025-03-241-5/+3
|\ | | | | | | Change-Id: I4855dc790ac212f40d98163bbb003699cc76e4fa
| * qqmljs: adapt paths to .qrc filesSami Shalayel2025-03-211-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The .qrc files have changed their locations in the build folder and introduced a regression in the embedded code model. Make the algorithm searching for .qrc files more relaxed such that it can find them again. This fixes the embedded code model going to the build folder file instead of the source folder file. Fixes: QTCREATORBUG-32652 Change-Id: I42f86ecd7416c615629d45b3bf7bd2c89b1247dd Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: David Schulz <[email protected]>
* | Utils: Simplify FilePath::relativePathFromhjk2025-03-041-2/+2
| | | | | | | | | | | | | | | | | | File system accesses are better avoided at this level, so shift the responsibility of having a directory as anchor to the caller side. Change-Id: Ibca6edcdaaf2f6d24dfaa51bcae401909b77f101 Reviewed-by: David Schulz <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* | ILocator: Make ILocator subclasses finalJarek Kobus2025-03-041-1/+1
| | | | | | | | | | | | | | Except of DirectoryFilter. Change-Id: I161b7a42e919d8dc7ce9d50acceac52dade2fef4 Reviewed-by: Eike Ziller <[email protected]>
* | De-noise *codestylepreferencesfactories a bithjk2025-02-131-51/+35
| | | | | | | | | | Change-Id: I41e4bdfe017ee77871b1f6f920645d0207156f99 Reviewed-by: David Schulz <[email protected]>
* | Move CodeStylePreferencesFactory implementation to .cpphjk2025-02-133-47/+42
| | | | | | | | | | | | | | | | Also remove the extra NimCodeStylePreferencesFactory singleton which was apparently not used. Change-Id: I454dfe511a57e912da7c15faa9631e212ebb7f95 Reviewed-by: David Schulz <[email protected]>
* | TextEditor: Remove references to ProjectExplorer::ProjectChristian Kandeler2025-02-103-7/+9
| | | | | | | | | | | | | | | | | | | | | | The TextEditor plugin does not have a depencency on ProjectExplorer, so we must not reference any symbols from there. This is a mechanical change that just hides the symbols to fix the problem ASAP. We may or may not want to look for a more elegant solution later. Change-Id: I821ca1a5e342abc604e5cca594b638fa73973e8c Reviewed-by: hjk <[email protected]> Reviewed-by: David Schulz <[email protected]>
* | ClangFormat et al.: Refactor settings factoriesAndrii Semkiv2025-02-104-62/+122
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Excessive granularity in style settings factories caused issues when individual widgets of the settings page were interdependent. For example, in ClangFormat settings the exporter widget (previously created independently) must know the currently selected mode from the global settings widget (previously also created independently) in order to export the correct settings (either legacy indenter's XML configuration or clang-format's YAML). This change shifts the granularity by one level (onto `CodeStyleEditor` class) so that the factories now produce ready-to-use widgets wheres each of `CodeStyleEditor` subclasses can handle dependencies in its building blocks as needed. This patch also features some clean-ups in various places in ClangFormat plugin as well as in some related parts of other plugins. A couple of the most prominent examples are: * ClangFormat settings widget and factory are no longer subclasses of the built-in indenter's counterparts. Instead the ClangFormat settings widget now *contains* the built-in indenter settings as a component. * Consequently, ClangFormat won't parasitize the built-in indenter's settings by injecting its own settings tab into them and showing/hiding it or the others. See the occurrences of "additionalTab" throughout the code. Note that the suggestion from QTCREATORBUG-32110 to add .clang-format file name when exporting settings does not work with the native file save dialog on Windows - the name is empty in the dialog (I assume the reason is that Windows interprets it as a file extension and automatically hides it). The non-native dialog is fine. It also works more or less as expected when exporting the built-in indenter XML configuration files. Task-number: QTCREATORBUG-32110 Task-number: QTCREATORBUG-32112 Task-number: QTCREATORBUG-32113 Change-Id: I6651d81ba5e422692b58661e1e216f98923e70e0 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Add convenience accessors to some classesChristian Kandeler2025-01-231-1/+1
| | | | | | | | | | | | Namely, Kit, BuildConfiguration, BuildSystem and RunConfiguration get functions to retrieve the active instance for a given project as well as the one for the current and active projects, respectively. This saves a ton of annoying null pointer checks. Some of these functions replace existing ones with the same purpose that were scattered around the code base. Change-Id: I18247061229bbeb8b8ad1e15a2bd7a6626438bc0 Reviewed-by: hjk <[email protected]>
* ProjectExplorer: Add and make use of forwarding accessors in ProjectChristian Kandeler2025-01-201-13/+9
| | | | | | | | | Most accesses to activeTarget() are for getting to the active kit or build/deploy/run configuration. Simplify client code by adding convenience functions for that. No functional changes intended. Change-Id: Ide266712d19f960e4512672eb3bd00fc4d21b47b Reviewed-by: hjk <[email protected]>
* Utils: Rename FilePath::toString() into toUrlishString()hjk2025-01-102-5/+5
| | | | | | | | | | | | | | | | 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 <[email protected]>
* ICodeStylePreferences: Reuse TypedCodeStylePreferencesJarek Kobus2024-12-1913-136/+19
| | | | | | | | Make CppCodeStylePreferences and QmlJsCodeStylePreferences typedefs to TypedCodeStylePreferences. Change-Id: I8d0ae7d07c1286d74fcdb68041faec5c6e76db40 Reviewed-by: David Schulz <[email protected]>
* StyleSettings: Introduce settingsId()Jarek Kobus2024-12-193-4/+9
| | | | | | | Reuse it in ICodeStylePreferences subclasses. Change-Id: I23f0e816bd643b1ce0e6d0e0652173152f62fcba Reviewed-by: David Schulz <[email protected]>
* ICodeStyleSettings: Remove currentCodeStyleSettingsChanged() signalsJarek Kobus2024-12-166-25/+8
| | | | | | | ...from its subclasses. Reuse currentValueChanged() instead. Change-Id: Iea696717176cc1a9557cf8ec3f0a1cf139cad7ed Reviewed-by: David Schulz <[email protected]>
* ICodeStylePreferences: Remove codeStyleSettingsChanged() signalsJarek Kobus2024-12-162-2/+0
| | | | | | | ...from its subclasses. They are not used. Change-Id: I6204bf24d89481fb0a70ba48d9c378a1e802bef3 Reviewed-by: David Schulz <[email protected]>
* Editor: link global settings in tab settings buttonDavid Schulz2024-12-061-0/+2
| | | | | Change-Id: I5ca9f3a2191e9146d5517dc8cccf6932e2c21032 Reviewed-by: Christian Stenger <[email protected]>
* ProjectExplorer: Dissolve kitaspects.{h,cpp}Christian Kandeler2024-11-201-1/+1
| | | | | | | Move the remaining classes into their own files. Change-Id: I301e72004c21446fa9b8f15942bb042218b0ecef Reviewed-by: hjk <[email protected]>
* Plugins: Improve display names of pluginsAlessandro Portale2024-11-191-0/+1
| | | | | | | | | | | This introduces a field "DisplayName" to PluginSpec and the plugin spec json files. If present in the spec, PluginSpec::displayName returns it, or otherways falls back to more established fields. Fixes: QTCREATORBUG-31761 Change-Id: I4f4c4f3e33b17dfb2ec63644b1f50b3b9c6c024a Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Core: Provide settings categories centrallyChristian Kandeler2024-11-152-2/+7
| | | | | | | | | It was conceptually wrong that an options page was supposed to set its category's display name and icon. Instead, categories are now explicitly registered with name and icon. Change-Id: Ic10b3791c8068176f55470e6845ab4832160b8e7 Reviewed-by: Eike Ziller <[email protected]>
* Revert "Plugins: Improve display names of plugins"Eike Ziller2024-10-161-1/+1
| | | | | | | | | | | This reverts commit 8e5fab2d1755289288f1ff719c2a0bfb6ca28066. Reason for revert: We still have too many places where the name is used as an "id", like the wizards, which are now mostly disabled. Sorting that out will take time. Change-Id: Ic76baa7f8f272d5f4fac00cbc08e9ffec337773f Reviewed-by: hjk <[email protected]>
* Plugins: Improve display names of pluginsAlessandro Portale2024-10-161-1/+1
| | | | | | Fixes: QTCREATORBUG-31761 Change-Id: I62b33248c77bf35907d66a38ac18eb0ecf1f323d Reviewed-by: Eike Ziller <[email protected]>
* ProjectExplorer: Move KitAspect into its own set of filesChristian Kandeler2024-10-112-0/+3
| | | | | | | There is no reason to lump it together with KitManager. Change-Id: I6cd225e390297c3dc7573ed4786c227c80ab17ce Reviewed-by: hjk <[email protected]>
* ILocatorFilter: Refactor ILocatorFilter::matchers() functionJarek Kobus2024-10-071-7/+4
| | | | | | | | | | | Introduce LocatorStorage::storage() method, to be used from the bodies of locator task handlers. Replace the return value of ILocatorFilter::matchers() with a list of ExecutableItems. Change-Id: I467bb9f217465af74a017095d4fffdf74c4ba7bd Reviewed-by: Eike Ziller <[email protected]>
* Unify copyright string and remove yearEike Ziller2024-09-261-1/+1
| | | | | | | | | | | The year is not needed and requires us to update it manually each year. So just remove it. Centralize it in the branding file to avoid changes to be done at lots of places (About dialog, plugin specs, app info plist & rc, docs, ...) in the future. Task-number: QTCREATORBUG-30432 Change-Id: Ia421924c19a1331b121e765bcea137920025598d Reviewed-by: Marcus Tillmanns <[email protected]>
* Preparatory changes to enable Id ctor from char(&)[]hjk2024-09-122-4/+2
| | | | | Change-Id: Ifacc56c1e5e1a13ec9e6a0e2d2f6f1087cb1fce3 Reviewed-by: Eike Ziller <[email protected]>
* Plugins: Add a few documentation Urls to plugin metadataAlessandro Portale2024-09-041-0/+1
| | | | | Change-Id: If5093f2252edacbe605760526e2fd7cf3284c6e6 Reviewed-by: Leena Miettinen <[email protected]>
* ExtensionSystem: Add PluginId and VendorIdMarcus Tillmanns2024-09-021-0/+2
| | | | | Change-Id: I4f47f95e1f4ff4af73c2b81320087b4592007993 Reviewed-by: Alessandro Portale <[email protected]>
* PluginSpecs: Change URLs from http:// to https://Alessandro Portale2024-05-281-1/+1
| | | | | | | | | | Avoid the redirect that is inevitable nowerdays. Also, change necessitas.kde.org to www.qt.io, since the orgininal page is offline. Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e Reviewed-by: Tim Jenssen <[email protected]>
* AsyncTask: Centralize setting global future synchronizerEike Ziller2024-05-211-3/+0
| | | | | | | | | | | Move the global FutureSynchronizer to Utils and use it by default for AsyncTask (if that is in the main thread). This way setting a synchronizer is less prone to be forgotten. Individual uses can still override this. Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448 Reviewed-by: <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* ModelManagerInterface: Cancel all running threads on session switchJarek Kobus2024-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | On session switch we cancel all the running tasks. We connect to the SessionManager::aboutToLoadSession() signal, as this one is emitted just before loading new session's projects. We don't connect to SessionManager::aboutToUnloadSession(), since after this signal is emitted the unloading may be canceled due to e.g. showing the dialog asking for saving changed files in the unloaded session (the user may cancel the process of unloading). In contrast to what we do on shutdown, we don't wait for futures being finished here - it's just enough we cancel all of them. Fixes: QTCREATORBUG-25583 Change-Id: I01eeca00d150f6e98a80a050c6a19efb848b9954 Reviewed-by: hjk <[email protected]>
* QmlJSTools: Fix testsChristian Stenger2024-01-311-1/+1
| | | | | | | | | Amends 316e48fc50fc467b0c1ccfa8680d02b5f7003c9f. Change-Id: I5d28a89cdae23a76b37654aff6560b8334452e01 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: <[email protected]> Reviewed-by: Thomas Hartmann <[email protected]>
* Utils: Fix error prone default value of appendOrSetMarcus Tillmanns2024-01-261-1/+3
| | | | | | | | | | | | | | | It was not readily clear that Environment::appendOrSet/prependOrSet needed a value for "sep", otherwise it would just concat the values without separator. This got apparent when looking at usages of appendOrSet. Instead there are now three options, "Auto", "Colon" or "Semicolon" with the default being "Auto", which determines the separator based on the Environment::OsType. Usages of appendOrSet and prependOrSet are also fixed with this commit. Change-Id: I868e14ce38f50be9cd07292fe3f22663a62d116d Reviewed-by: hjk <[email protected]>
* QmlJSTools: Fix qbs buildChristian Kandeler2024-01-161-2/+4
| | | | | Change-Id: I3875afb3034cc8eb4dfe79f73a0b84edeb714c70 Reviewed-by: Christian Stenger <[email protected]>
* QmlJSTools: Hide plugin class in .cpphjk2024-01-165-61/+68
| | | | | Change-Id: Idfd3741141c076e2269fee99c89ef15f6e6f3b7c Reviewed-by: Jarek Kobus <[email protected]>
* QmlJsEditor: Don't export Internal classeshjk2024-01-093-44/+69
| | | | | | | | Export two functions doing the actual work instead. Centralize some repeated code. Change-Id: I7de674ef7ae5537663d1227d36cc556c4ee3ed74 Reviewed-by: Jarek Kobus <[email protected]>
* Fix crash when loading a .pyproject into Qt Creator with empty settingsFriedemann Kleint2023-12-011-1/+2
| | | | | | | | The build system is 0 as long as no kits are created. Change-Id: Ia7f283071740dabe76ff3dd6b2f59e5ca214b7c2 Reviewed-by: David Schulz <[email protected]> Reviewed-by: <[email protected]>
* TextEditor: Get rid of extra indent ranges in RefactoringFileChristian Kandeler2023-11-222-41/+5
| | | | | | | | | | Having extra indent regions complicates the interface, the implementation and the calling code. Instead, derive the indent regions from the change set and let callers opt out for the relatively few cases where indentation is not desired. Change-Id: I49d2854830a51778534ef260fb5c9f2c7685554a Reviewed-by: David Schulz <[email protected]>
* TextEditor: Remove unneeded RefactoringFile::setFilePath()Christian Kandeler2023-11-221-2/+0
| | | | | | Change-Id: Ia44642191259b83539c093d04921317b6155fdee Reviewed-by: David Schulz <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* CppEditor/QmlJSTools: Simplify RefactoringFile::file() re-implementationChristian Kandeler2023-11-211-2/+2
| | | | | | Change-Id: I8f2af8de3786ecf4400bc42019d496bd52bb2545 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: David Schulz <[email protected]>