summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * ClangFormat: Fix settings checkboxes disappearanceArtem Sokolovskii2022-05-102-2/+6
| | | | | | | | | | | | | | | | | | | | - Fixed settings checkboxes disappearance after open a project - Fixed impossibility to save settings Task-number: QTCREATORBUG-26948 Change-Id: Ia73a61bf56b99adea9ed45c9d656860b185a3d7e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * qmljs: correctly handle js string templatesFawzi Mohamed2022-04-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In most cases we do want to visit the expressions in a function template. Changing its accept0 would force those not wanting to visit it to iterate on the templates (currently a linked list), so we add a visit method explicitly visiting the expression in all the needed places. Fixes: QTCREATORBUG-21869 Change-Id: I47733544bfd32eec357810b97242608b8f7de572 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * qmljs: fix scan out of build dirFawzi Mohamed2022-02-141-8/+41
| | | | | | | | | | | | | | | | | | | | | | Scan outside the build directory was possible on mac and windows. Avoid it by checking the relative path to the build directory. Change-Id: I6a7082998429f902745146446bf89fc0cc75ca54 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit bdd7fcbac214a519e6836031281119c5824c5835) Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | CMake: Qt Creator Static build supportCristian Adam2022-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the build system feature that allows Qt Creator's libraries and plugins to be compiled statically. Fixes some symbol clashes when all plugins are linked into the same executable. Support for actually loading static plugins will be added in a separate commit. The feature is controlled by QTC_STATIC_BUILD which by default is OFF. Change-Id: I1fab7953c43e42dc75619e35660029ee067106df Reviewed-by: hjk <hjk@qt.io> 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>
* | QmlJSTools: Fix compile with QbsChristian Stenger2022-04-088-17/+29
| | | | | | | | | | | | | | | | Amends 87e52ad189291. While at it reorder includes to match QC style. Change-Id: I8bbfdd4db9409a7348e7a2cbcb954972a2a2f9b4 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Line length for QML/JS editing automatic formattingXavier BESSON2022-04-0716-44/+755
| | | | | | | | | | | | | | | | | | | | Adding parameters to functions in the QML/JS formatter Adding widget and setting to the QML/JS editing settings Fixes: QTCREATORBUG-23411 Change-Id: Ib9d3ac3b22443e81cd636fbc276c6544dab1511b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* | ClangFormat: Fix unsaving properties for global settingsArtem Sokolovskii2022-03-304-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed behavior "Formatting mode" combobox settings isn't saved after pressing "Ok" button when no one project is open. Now it works as expected, settings save after press "Ok" button. - Added additional applying interface for ICodeStylePreferenceFactory which allows pass-through apply call from dialog to the editor. Note: it doesn't work with read-only code style profiles Change-Id: If4f0c85e3105550db4ffd9860e94b678f0d9b386 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qmljs: correctly handle js string templatesFawzi Mohamed2022-03-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In most cases we do want to visit the expressions in a function template. Changing its accept0 would force those not wanting to visit it to iterate on the templates (currently a linked list), so we add a visit method explicitly visiting the expression in all the needed places. Fixes: QTCREATORBUG-21869 Change-Id: I47733544bfd32eec357810b97242608b8f7de572 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
* | Mimetypes: Make implementation switchable between new and oldEike Ziller2022-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in utils/mimetypes2/ - added utils/mimeutils.h header for the Qt Creator specific static wrappers, that also includes the "public" headers for MimeType et al from the new or old implementation, depending on configuration - change all utils/mimetypes/ includes to utils/mimeutils.h - move the implementation for the wrappers to utils/mimetypes(2)/mimeutils.cpp - also move the MimeDatabase declaration in the "old" implementation back to utils/mimetypes/mimedatabase.h Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | qmljs: fix scan out of build dirFawzi Mohamed2022-02-111-8/+41
| | | | | | | | | | | | | | | | Scan outside the build directory was possible on mac and windows. Avoid it by checking the relative path to the build directory. Change-Id: I6a7082998429f902745146446bf89fc0cc75ca54 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-02-112-2/+2
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
| * Core: Turn LocatorFilterEntry ofn ILocatorFilter::accept to const &Alessandro Portale2022-02-112-2/+2
| | | | | | | | | | | | | | | | | | In ILocatorFilter::accept and all the overrides. Change-Id: I27cd6babb66d91aad57e85572a1cdc77aef4fd79 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: filepathify actualTabSettingsDavid Schulz2022-02-041-2/+2
|/ | | | | | Change-Id: I4b08b96d56bfeed0348d82bb96ff70d5f8ad583b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rename QtSupport::BaseQtVersion to QtVersionhjk2022-01-242-3/+3
| | | | | | | | | | ... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid conflicts. Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove qmake build filesEike Ziller2022-01-202-62/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* qmljsmodelmanager: Add additional directories to find qmltypesMaximilian Goldstein2021-12-071-0/+11
| | | | | | | | | | | | | | This works around the issue that we only looked for qmltypes in the directory the binary ends up being stored in. This did not work for macOS and Windows as those are stored in subdirectories due the platform specific ways binaries are stored there. Now we also look in the directory where the qmltypes should be located on these platforms. Task-number: QTCREATORBUG-24987 Change-Id: I23d46e68f8fad0b4e2e8a01fc7c41360f1e6961e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* EditorManager: Remove QString openEditor(At) overloadsEike Ziller2021-11-021-1/+2
| | | | | | | | In favor of the FilePath/Link ones. Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* QmlJS: Proliferate FilePath and QtcProcess use in QmlJSPluginDumperhjk2021-10-271-4/+4
| | | | | Change-Id: Ie483bb2e9b5d812d380470949564a6bc57801fa9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge CppTools into CppEditorChristian Kandeler2021-09-016-9/+9
| | | | | | | | | | | | | | | | There was no proper separation of responsibilities between these plugins. In particular, CppTools had lots of editor-related functionality, so it's not clear why it was separated out in the first place. In fact, for a lot of code, it seemed quite arbitrary where it was put (just one example: switchHeaderSource() was in CppTools, wheras switchDeclarationDefinition() was in CppEditor). Merging the plugins will enable us to get rid of various convoluted pseudo-abstractions that were only introduced to keep up the artificial separation. Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* baseqtversion: commands are FilePathesTim Jenssen2021-07-141-1/+1
| | | | | | | | also renamed the qmlscene* qmlRuntime* Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlJSTools: Guard against null pointer accessv5.0.0-beta1Robert Löhning2021-07-071-1/+1
| | | | | | | Fixes: QTCREATORBUG-25943 Change-Id: If9e6528b0dc5642dbd150e7d20aeb9347f3d4465 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* QtSupport: Use FilePath for several BaseQtVersion membershjk2021-07-011-1/+1
| | | | | | | | | | uicCommand(), designerCommand(), linguistCommand(), qscxmlcCommand(), qmlsceneCommand(), qmlplugindumpCommand(). No change in functionality intented. Change-Id: I43121de559019f96c2c1ff3b423974dddfc37124 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* qmljstools::LocatorData: improve safetyFawzi Mohamed2021-06-281-2/+5
| | | | | | | | | | | * check that we create LocatorData in the same thread as the ModelManagerInterface * pass this as connect context, to ensure signal disconnect Change-Id: I5e51af90c521fd8c83a6cfe2d105832f5a02a04f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 584f0476eca8676abc652d8e907b5e10c08da787) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* MimeDatabase: add FilePath convenience functionDavid Schulz2021-06-231-1/+1
| | | | | Change-Id: I59c825490b3b5c49f3c177584ea4cc885c4f920b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: filepathify RefactoringChangesDavid Schulz2021-06-082-16/+18
| | | | | Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Add a default parameter to various ICore::*path functionshjk2021-04-273-4/+3
| | | | | | | | Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ICore: Change some path API to use FilePathEike Ziller2021-04-263-9/+11
| | | | | | Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Simplify handling of qmlplugindumpKai Köhne2021-03-231-16/+6
| | | | | | | | | | | | | | | | Much of it isn't needed anymore: - we do not build a debug version of qmlplugindump anymore since Qt 5.0 - on mac, qmlplugindump is not an app bundle since Qt 5.1 - since commit 6871f31b4ec6, the env parameter was just passed through So if we take out this and all the infrastructure around it, qmlplugindump is just a tool that we can handle like all the other tools. Change-Id: Ifa583ce7052a9030858312ab7c2e20f7ebce4051 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Remove unused includes of mutex classesJarek Kobus2021-02-181-1/+0
| | | | | Change-Id: I5a34cda0b27786cb37e642479b11fbd24b8b5c36 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* MCU: Do not add fall-back path for QUL kitsErik Verbruggen2021-02-161-1/+1
| | | | | | Fixes: UL-3609 Change-Id: I9912c7476f3b45346835d60be61fed7399046162 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Provide empty implementation for ILocatorFilter::refresh()Jarek Kobus2021-02-112-5/+0
| | | | | | | | Make this method just virtual, not a pure virtual. Remove all empty reimplementations of this method. Change-Id: Idf10e492355e8519172facd421ea0b2b13ce3b80 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Refactor Locator filter settings savingEike Ziller2021-02-041-2/+2
| | | | | | | | | | | | | | | | Unify setting saving. Do not write settings that stay at the default, so defaults could change and take effect. For this we explicitly differentiate between default and user settings. Make QJsonDocument the basis for saving settings, because QDataStream cannot really handle structured data where parts could be missing. Write locator settings to a different settings group, so we do not destroy reading older settings from older Qt Creator versions. Task-number: QTCREATORBUG-24762 Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use new, more evocative MessageManager APIEike Ziller2020-12-161-1/+1
| | | | | | | At various places where semantics doesn't change. Change-Id: Ib4d4a5c9f067e109126c6de88257f9e198a71447 Reviewed-by: hjk <hjk@qt.io>
* Remove unneeded includeJarek Kobus2020-12-081-1/+0
| | | | | Change-Id: Ifb857526ee559a4e1c8d48602fd89b3030238691 Reviewed-by: hjk <hjk@qt.io>
* Fix build with Qt6Eike Ziller2020-10-261-0/+1
| | | | | | | | | | | Add missing includes for "incomplete type" issues. Remove usage of QDesktopWidget. Don't compile native WebKit help backend (missing native widget integration). Add SvgWidget dependency. Task-number: QTCREATORBUG-24098 Change-Id: I1b3afb54d385940ff283824870fa7454866212a4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* qml: fix refactoring to separate componentFawzi Mohamed2020-09-301-3/+10
| | | | | | | | | * avoid extra spaces * warn about existing files Fixes: QTCREATORBUG-21091 Change-Id: Ic9ed4444bd028455e1b2d1755e6c43f352dfd5e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QmlJS(Tools) build with Qt5 & Qt6Eike Ziller2020-09-171-2/+2
| | | | | | | Port from QStringRef to QStringView Change-Id: I472d16f20e40ca52b8e5d481850a6bd8a1a38f3b Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/cmakeprojectmanager/cmakebuildstep.cpp src/plugins/cmakeprojectmanager/cmakebuildstep.h tests/auto/debugger/tst_namedemangler.cpp tests/auto/qml/codemodel/check/tst_check.cpp Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
| * QmlJSTools: Fix plugin unit testChristian Stenger2020-07-281-1/+1
| | | | | | | | | | | | | | Amends 58ea14aea7c676. Change-Id: I27d68572cffd9d2e37b3dbf8c47c75633db5d806 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Core/Utils: Migrate further to Utils::Idhjk2020-07-063-4/+4
| | | | | | | | | | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | QmlJSTools: Remove unused includeChristian Stenger2020-07-201-1/+0
| | | | | | | | | | Change-Id: I4bc61fdebd9b2c20497e7569cdb5f5000317f22d Reviewed-by: hjk <hjk@qt.io>
* | Core/Utils: Migrate further to Utils::Idhjk2020-07-063-4/+4
|/ | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ExtensionSystem: Remove PluginSpec::isHiddenByDefaulthjk2020-06-161-1/+0
| | | | | | | Not used anymore. Change-Id: Ic73ba3024b9e6157ff044cb23450fc9dad3c4c02 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* QmlJS: Track futures to allow testingChristian Kamm2020-05-211-1/+1
| | | | | | | | | Tests often want to wait for all async tasks to finish before progressing. Change-Id: I61738df730ca341b5c9d227569d961cd1991b296 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Philip Van Hoof <philip@codeminded.be>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-03-261-0/+7
|\ | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/dialogs/shortcutsettings.cpp Change-Id: I1f21845350bb69268ca51bc77167a8244adce22a
| * Editor: Add Qt Script mime typeDavid Schulz2020-03-241-0/+7
| | | | | | | | | | | | Fixes: QTCREATORBUG-23715 Change-Id: I4c7da375a11fb35c66e19769746267b2b661ee55 Reviewed-by: Eike Ziller <eike.ziller@qt.io>