summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools
Commit message (Collapse)AuthorAgeFilesLines
* CppEditor/QmlJSTools: Remove settings migration from Qt Creator 2.3Alessandro Portale2023-05-171-39/+0
| | | | | | | | | | | | | | This removes settings migration from Cpp Code Style Settings migration from Qt Creator <= 2.3 to 2.3+ Let's assume that most active Qt Creator users launched a Qt Creator 2.4 or later in the last decade if they still work with their decade-old installation. Change-Id: I9c49dd9c1c0bd85e2b8c58a0d4eb6c393abf94a1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ILocatorFilter: Remove calls to setDefaultIncludedByDefault(false)Jarek Kobus2023-05-161-1/+0
| | | | | | | | | | | | By default, setDefaultIncludedByDefault() is set to false, so no need to repeat it now in direct subclasses. Leave it only inside the AllProjectFilesFilter, as the DirectoryFilter superclass sets it to true. Change-Id: Ib66d112a3bfeed52315663f6898148cf5c5d88b1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QmlJSFunctionsFilter: Remove the old matchesFor() implementationJarek Kobus2023-05-103-59/+8
| | | | | | | | | | | Rename the filter to QmlJSFunctionsFilter, to conform to the other naming (CppFunctionsFilter, LanguageFunctionsFilter, ClangdFunctionsFilter). Change-Id: I6859c5c8f6d133d1f4dd49d4ee2742b5744c1463 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Layouting: Handle attach types via setterhjk2023-05-032-3/+5
| | | | | | Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}Jarek Kobus2023-05-031-1/+1
| | | | | | | Follows AsyncTask -> Async rename. Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225 Reviewed-by: hjk <hjk@qt.io>
* Tasking::Async: Rename Async into AsyncTaskJarek Kobus2023-05-031-2/+2
| | | | | | | | | Rename Utils::AsyncTask into Utils::Async. Rename AsyncTaskBase into AsyncTask. Task-number: QTCREATORBUG-29102 Change-Id: I3aa24d84138c19922d4f61b1c9cf15bc8989f60e Reviewed-by: hjk <hjk@qt.io>
* QmlJSToolsPlugin: Reimplement matchers()Jarek Kobus2023-04-272-2/+66
| | | | | | Change-Id: If6767b4dc62eddddce0285b7b766f44241f3367e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Make Layouting a top level namespacehjk2023-04-252-2/+2
| | | | | | | | | | The whole machinery is now almost only layoutbuilder.{h,cpp}, mostly independent of the rest of Utils. Idea is to finish the separation to make it stand-alone usable also outside creator. Change-Id: I958aa667d17ae26b21209f22412309c5307a579c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlJS: Stop suggesting versions for imports if possibleChristian Stenger2023-04-242-15/+23
| | | | | | | | Fixes: QTCREATORBUG-28649 Change-Id: I918b229855c18519800a54a73b56eaffa40524e5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* QmlJSTools: Use IOptionPage::setWidgetCreator() for settingshjk2023-04-212-55/+39
| | | | | Change-Id: I57442416da54acd49cfcfd172fc67f28fee4f7b8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJS: Improve QtQuick Controls completionChristian Stenger2023-04-212-5/+12
| | | | | | Fixes: QTCREATORBUG-28648 Change-Id: I14c402c8a486d5afa7ee500b2d8a06951540e1bd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* LocatorFilterEntry: Get rid of filter fieldJarek Kobus2023-04-201-1/+2
| | | | | | | | | Remove also c'tor taking a pointer to filter. Change-Id: Ic0fe62daeb6e79a729bee24d07d7eb77559e19c4 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Show locator filter descriptions more prominentlyEike Ziller2023-04-181-0/+1
| | | | | | | | | | | - Sort items in the menu. - Disable items for disabled filters. - Show a tool tip when hovering over the magnifying glass menu. - Add descriptions to all filters and make them more consistent. Change-Id: Ic03e303c50422f9de5dd3c512fe32bbdc958d2ba Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ILocatorFilter: Don't store IndexItem::Ptr as internalDataJarek Kobus2023-04-041-2/+1
| | | | | | | | | Currently it's never read. Change-Id: If89486ad8ad74c3431fe420d83fbec9a22855f04 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace a few \returns by Returnshjk2023-03-241-1/+1
| | | | | Change-Id: I09c633e610421f5cc8257b15de60ffa98d890ee0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Qbs build system: Add a component for test files groupsAlessandro Portale2023-03-211-3/+1
| | | | | | | | | Mainly in order to enforce a unified group name across QtC libraries and plugins. Change-Id: I6eafe0f9d227ec73d8c9029675866c67063768fb Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ILocatorFilter: Provide default implementation for accept()Jarek Kobus2023-03-032-15/+0
| | | | | | | Change-Id: Ide3c65ac78da60c9634b8f1c3009e947e8f1e2f3 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LocatorFilter classes: Use more linkForEditorJarek Kobus2023-03-031-2/+2
| | | | | | | | Limit the usage of ambiguous internalData. Change-Id: Ice67884b9fb2ff303939cd5998c6e80453e82530 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Move some not-fully-session related bitshjk2023-03-012-7/+8
| | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LocatorFilter classes: Use Core namespaceJarek Kobus2023-02-231-11/+10
| | | | | | Change-Id: I4fd1b1ed6aa9d844ed49123e80bfb066b9fa7af2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Translations: Fix occurrence of tr() call with randomn contextAlessandro Portale2023-02-201-1/+1
| | | | | Change-Id: Iaba347e3611f894c9f76cffa7e8b7870d13d9920 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Translations: Change translation context prefix from "::" to "QtC::"Alessandro Portale2023-02-102-2/+2
| | | | | | | lupdate would be confused by translation contexts starting with :: Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c Reviewed-by: hjk <hjk@qt.io>
* Translations: Add missing "::" prefixes to QT_TRANSLATE_NOOPAlessandro Portale2023-02-081-1/+1
| | | | | | Change-Id: I7589a2d4003394e38e58c095b510f8eff33263b8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove unneeded includes of utils/runextensions.hJarek Kobus2023-01-271-2/+1
| | | | | | | BTW, spotted some other unused includes marked with yellow. Change-Id: I364e4b6fae73a2be2cfd3a63c1100be4a91aa49a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Use an enum indication the possible abort of an dir iterationhjk2023-01-261-1/+1
| | | | | | | | The bool is not really clear. Change-Id: I4ce6412736aec6b1853fd53d4e535ad045748350 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Use simpler Plugin::initialize() when feasiblehjk2023-01-202-7/+2
| | | | | Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Prefix Tr::tr contexts with ::hjk2023-01-133-3/+3
| | | | | | | To make outliers better visible in Linguist Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-0636-36/+36
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/qds/dev'Tim Jenssen2022-12-141-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/assetslibrary/assetslibrarymodel.cpp src/plugins/qmldesigner/components/contentlibrary/contentlibrarytexturesmodel.cpp Change-Id: Ieda6242b845387100022b08251283891fb0fbda7
| * QmlJS: std::set instead of QListThomas Hartmann2022-11-231-1/+1
| | | | | | | | | | | | | | | | | | This reduces the CPU time of Export::visibleInVContext() from 50% to 15% on Windows, when switching files. Change-Id: Iff82924c47d1b696c9d3d7ca40f49d9d02bcb3e6 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| * Merge remote-tracking branch 'origin/9.0' into qds/devTim Jenssen2022-11-092-3/+33
| |\ | | | | | | | | | Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
* | | Remove unused includes of QLayoutJarek Kobus2022-11-181-3/+0
| | | | | | | | | | | | | | | Change-Id: I12777e07f3d6fcc639b48f02080e73b1a0a3ea30 Reviewed-by: hjk <hjk@qt.io>
* | | Merge remote-tracking branch 'origin/9.0'Eike Ziller2022-11-102-3/+33
|\ \ \ | |/ / |/| / | |/ Change-Id: Ie069f3b2a1200b3e665341b1d56ce836024b0d29
| * QmlJS: Fix Follow under cursorMarcus Tillmanns2022-11-082-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to jump to a symbol in a qml file the Qml Model may find the location in a generated .qml file in the build folder. QtCreator searches in all generated .qrc files to try and find the source file so it can jump to it instead. Previously not all auto-generated ".rcc" folders would be found as only the folders of targets (executables) were searched. Plugins or Static Libraries were not searched. With this fix, all projects nodes are searched for the ".rcc" folder and therefore also finds them for Dynamic / Static libraries and plugins. Fixes: QTCREATORBUG-27173 Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/9.0'Orgad Shaneh2022-10-191-1/+1
|\ \ | |/ | | | | Change-Id: I5e6cfc111941f9609285e1b802121644fa8cdaac
| * Utils: Rename FilePath::relativePath() to relativePathFrom()hjk2022-10-181-1/+1
| | | | | | | | | | | | | | Hopefully less confusion about the direction. Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Automatic qmlls support (experimental)Fawzi Mohamed2022-10-121-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks for qmlls (the qml language server of Qt) and if available and set in the preferences uses it instead of the embedded code model for the supported features. Its usage is driven by two flags that can be set in the QtQuick > QML/JS Editing preferences: "use qmlls" activates the use of qmlls if available; "use latest qmlls" always uses the qmlls of the latest Qt, instead of the one of the target (with the one used to compile QtCreator as fallback). To support disabling/enabling of qmlls as soon as one changes the preferences the singleton QmllsSettingsManager can emit a signal on changes. It also keeps track of the latest qmlls binary known. QmlJS::ModelmanagerInterface::ProjectInfo is also extended to keep track of the qmlls binary. QmlJSEditorDocument uses the ProjectInfo and QmllsSettingsManager to decide if a LanguageClient::Client should be started for that document. The client uses the QmllsClient subclass to keep track of the path of the qmlls clients and use the same qmlls process or all files that use the same binary. Currently qmlls <6.4.0 are not considered because they might have too many issues. The enabling/disabling of warnings and highlight is a bit cumbersome because they are handled together in the semantic highlighter, but must be handled separately depending on the qmlls capabilities. The disabling is done at the latest moment stopping the visualization of the embedded model warnings/highlights/suggestions. The computation of the semantic info is not suppressed to support the other features (find usages, semantic highlighting if active,...). When qmlls supports more features a complete removal of the semantic info construction could be evaluated. Change-Id: I3487e1680841025cabba6b339fbfe820ef83f858 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: improve visual indent depth for empty blocksDavid Schulz2022-10-102-0/+7
| | | | | | | | | | | Use the indenter based visual indent only for the cpp qt style indenter since it gives accurate results. In all other casess Look for the next and previous not empty lines and use the minimum indent depth of those lines as the visual indent depth for empty lines. Task-number: QTCREATORBUG-28179 Change-Id: Ic456fba5adfb2a12f20e2bd4fc663010c752b65c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-072-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* QmlJSTools: Convert to using Tr::trAlessandro Portale2022-10-065-17/+20
| | | | | Change-Id: I40595e560fb2499226bd2c914a0b78ed68f830ab Reviewed-by: hjk <hjk@qt.io>
* TextEditor: Fix enabling of CodeStylePreferences for QmlJsAlessandro Portale2022-09-071-5/+4
| | | | | Change-Id: I00aa297ab96b71ebd4e49096f60d2f0dee5af587 Reviewed-by: David Schulz <david.schulz@qt.io>
* QmlJSTools: inline .ui filesAlessandro Portale2022-09-029-216/+74
| | | | | | | | | qmljscodestylesettingswidget.ui qmljscodestylesettingspage.ui Change-Id: I6d688e9e9b7cbefb552ef015f87d7a3cba21d699 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Remove Utils::optionalEike Ziller2022-09-011-2/+2
| | | | | | | | | | Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-2636-864/+72
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Drop Qt5: Qml lib / QmlDesigner: Get rid of QOverloadJarek Kobus2022-07-201-2/+1
| | | | | | | | Add a context object into some lambdas. Change-Id: I16ee7a0c061483e4d90c9e015852c41a4f3cde90 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* qmljs: (QString -> Utils::FilePath)++Fawzi Mohamed2022-07-136-54/+55
| | | | | | | | | convert more QString containing paths to Utils::FilePath Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Add plugintr.h files to all pluginshjk2022-06-273-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except FakeVim, which had it before. for i in [a-eg-z]*/*.json ; do upper=${i##*/} upper=${upper/.json/} lower=${i%/*} trfile=$lower/${lower}tr.h cat << EOT > $lower/${lower}tr.h /**************************************************************************** ** ** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ namespace $upper { struct Tr { Q_DECLARE_TR_FUNCTIONS($upper) }; } // namespace $upper EOT git add $trfile perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs done Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Label error for line length setting in QML editorXavier BESSON2022-06-081-1/+1
| | | | | | Change-Id: I637ef8b5aebfb05ebe9c132b3c6a60f170337c57 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QMLPlugins: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-06-014-12/+20
| | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Ie3e3ec9fdaea856943e5325cabd21e52bf290e70 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-05-102-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/clangformat/clangformatconfigwidget.cpp src/plugins/clangformat/clangformatplugin.cpp src/plugins/cppeditor/cppcodestylepreferencesfactory.cpp src/plugins/cppeditor/cppcodestylepreferencesfactory.h src/plugins/nim/settings/nimcodestylepreferencesfactory.cpp src/plugins/nim/settings/nimcodestylepreferencesfactory.h src/plugins/qmljstools/qmljscodestylepreferencesfactory.cpp src/plugins/qmljstools/qmljscodestylepreferencesfactory.h src/plugins/texteditor/codestyleselectorwidget.cpp src/plugins/texteditor/icodestylepreferencesfactory.h Change-Id: I20ee430a7f0085774c9df1aa5487046ba4f404c1