Commit Graph

131 Commits

Author SHA1 Message Date
hjk
f52cf6b564 QmlProjectManager: Use setup pattern for QmlProjectRunConfiguration
Change-Id: Ib69a09c65a4755312663286fddbd891c4f7c49ce
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-18 10:18:04 +00:00
hjk
d86ec67f31 QmlProjectManager: Delay construction of some run worker factories
... until the base factories are there.

Change-Id: I0b3541c32eb7f7bbc24461a0fc9c1be85fc4f29b
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
2024-01-18 09:29:16 +00:00
Dominik Holland
1d2ed65d93 Create RunConfiguration specific QmlProfilerWorkerFactories
Instead of relying on the QmlProfilerRunWorkerFactory to match for all
RunConfiguration, every plugin needs to create a WorkerFactory for
its own RunConfiguration.

Similar to the SimpleTargetRunnerFactory there is now a
SimpleQmlProfilerRunnerFactory which makes the setup easy.

Change-Id: I504ca5afe232cb4e3aa0bb0b67271637a7e7a9d0
Reviewed-by: hjk <hjk@qt.io>
2024-01-17 12:34:59 +00:00
Dominik Holland
c81efc39c8 Create RunConfiguration specific DebugWorkerFactories
Instead of relying on the DebuggerRunWorkerFactory to match for all
RunConfiguration, every plugin needs to create a WorkerFactory for
its own RunConfiguration.

Similar to the SimpleTargetRunnerFactory there is now a
SimpleDebugRunnerFactory which makes the setup easy.

Change-Id: I25aaabcd70f7ac649baeab4eb4c7e88d53dac91e
Reviewed-by: hjk <hjk@qt.io>
2024-01-17 10:17:41 +00:00
hjk
2f987932c1 QmlProjectManager: Hide plugin class in .cpp
Change-Id: If9ed1c00c53f127ba328f5011772431b5e5b25f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 13:44:46 +00:00
hjk
b63e2d39e8 QmlProjectManager: Cleanup qmlprojectplugin.cpp
... in preparation of moving the plugin class.

Change-Id: I449439f8db0a1c74dde51bf33a6f0e01fbc2a727
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 11:46:07 +00:00
hjk
6685f0255d Utils/all: Move mime constants into a central place
They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.

Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-08 09:59:26 +00:00
Tim Jenssen
85ea2758ac Merge remote-tracking branch 'origin/qds/dev' into 12.0
Conflicts:
	share/qtcreator/qmldesigner/connectionseditor/SuggestionPopup.qml
	share/qtcreator/themes/dark.creatortheme
	share/qtcreator/themes/default.creatortheme
	share/qtcreator/themes/flat-dark.creatortheme
	share/qtcreator/themes/flat-light.creatortheme
	share/qtcreator/themes/flat.creatortheme
	src/libs/utils/CMakeLists.txt
	src/plugins/CMakeLists.txt
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: Idd87c281e1aa7b7fd2702473ad55e18563cbfb21
2023-10-05 15:53:42 +02:00
Tim Jenssen
97ca8cc270 Core: add ICore::isQtDesignStudio()
Change-Id: I3aed97b62abd05b283ac327be210af75f173383d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-10-04 14:39:39 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
Tim Jenssen
1b6c0ff56c Merge remote-tracking branch 'origin/qds/dev'
Conflicts:
  coin/instructions/build.yaml
  doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc
  share/qtcreator/qmldesigner/studio_templates/projects/common/CMakeLists.main.txt.tpl
  src/libs/CMakeLists.txt
  src/libs/advanceddockingsystem/dockmanager.cpp
  src/libs/advanceddockingsystem/workspacedialog.cpp
  src/plugins/coreplugin/manhattanstyle.cpp
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmldesigner/components/formeditor/toolbox.cpp
  src/plugins/qmldesigner/components/itemlibrary/itemlibraryassetimporter.cpp
  src/plugins/qmldesigner/components/toolbar/toolbarbackend.cpp
  src/plugins/qmldesigner/designercore/projectstorage/qmltypesparser.h
  src/plugins/qmldesigner/qmldesignerexternaldependencies.cpp
  src/plugins/qmldesignerbase/qmldesignerbaseplugin.cpp
  src/plugins/qmldesignerbase/qmldesignerbaseplugin.h
  src/plugins/qmlprojectmanager/qmlproject.cpp
  src/tools/qml2puppet/CMakeLists.txt
  tests/unit/unittest/CMakeLists.txt

Change-Id: I2c5f18c4fca49471d02713ce5859032232cf7756
2023-05-22 21:13:40 +02:00
Knud Dollereder
5bf1b598c1 Move mcu deploy step into the mcusupport plugin
This deploy step will run the qmlprojectexporter commandline tool
on the currently active qmlproject if qtForMCUs is set to true.
The output of the tool is shown in the "Compile Output" panel.
Possible configuration issues are shown in the "Issues" panel.
Note that the step is not removed from the list but disabled when
setting qtForMCUs to false in order to retain possible changes made
by the user.

Change-Id: I03b0d6fbe420b49400d48e7365d4395491b9aa2d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-05-11 08:50:46 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Knud Dollereder
3387c68ff2 Add MCU build step to the QmlBuildSystem
If a qml project is marked as qtForMCU the buildstep will
run the qmlprojectexporter on the currently active qmlproject
when pressing the "Run" button. The output messages of the tool
will then show up in the "Compile Output" panel.
The build step itself can be seen when switching to "Projects"
mode under "Deployment".

Change-Id: I5ac31d5655e3b4b6137aaf541839776f144a09c4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
2023-04-20 16:51:39 +00:00
Burak Hancerli
66d72433a6 QmlProject: Refactor QmlProjectManager
- feature: JSON based project manager plugin
- feature: functionality to write QmlProject file
- tests: tests for QmlProjectItem

Task-number: QDS-8810
Change-Id: I8989e54577e9cd883bd76346e22774cc7f7ed93f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 15:13:43 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... 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>
2023-03-01 09:26:50 +00:00
hjk
118b84ffd6 Use simpler Plugin::initialize() when feasible
Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-20 12:13:10 +00:00
Alessandro Portale
0fff2aa172 QmlProjectManager: Tr::tr
Change-Id: I219111bab487ad5f2d7d1cd7ae6f3e3e8a2a8d3f
Reviewed-by: hjk <hjk@qt.io>
2023-01-19 15:53:58 +00:00
hjk
f08b5727dc ProjectExplorer: Introduce and use convenience factory class
... to create SimpleTargetRunner runners for a single run config.

Change-Id: I8af3d7cdcaf54f0584af948aa6e0fa015d1a3077
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-10 12:02:51 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
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>
2023-01-06 11:15:13 +00:00
Thomas Hartmann
4a556fef39 QmlProject: Check if .qmlproject file does exist
Task-number: QDS-7434
Change-Id: I3e6717dbab47fd9e5c9fb84c4131ac2f88984cd8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-18 17:09:45 +00:00
Leena Miettinen
b9e45d7b30 UI text: Fix spacing in multi-line messages
You need an empty space at the end of a line (before quotes),
but no empty space after \n.

Task-number: QTCREATORBUG-28334
Change-Id: I192836cb10b819a359778879c64e6b80aaa059f2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-20 07:02:52 +00:00
Marcus Tillmanns
b17cf5f117 Plugins: Fix nullptr access
Some plugins access their private "d" member in their destructor.
If Plugin initialization failed, these might not have been created.

This would lead to a crash.

Change-Id: Ifd916daf90ebac9a8933dd5489ec1ac0a38254a0
Reviewed-by: hjk <hjk@qt.io>
2022-09-01 08:19:25 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Marcus Tillmanns
451d02c88d FilePath: Remove ::toDir() and deprecation hints
Change-Id: Ib561c019e3fd44cd85504ad4286eb3759ce19516
Reviewed-by: hjk <hjk@qt.io>
2022-08-04 08:46:06 +00:00
Marcus Tillmanns
3462bc67be filesystem: Add QFSEngine for filepaths
Change-Id: Ibd0c88c69863c0877138d8cc45541530c359bd9c
Reviewed-by: hjk <hjk@qt.io>
2022-07-21 13:14:01 +00:00
Alessandro Portale
ee5ffafa45 QmlProjectManager: Improve font loading for the QDS landing page
The Titillium Web font comes in a QML module with FontLoader. Use that
instead of QFontDataBase, and retrieve the exact family name.

This also ensures that the font is loaded when editing the page in QDS
(if it is not loaded before e.g. by the QDS Welcome Screen).

Change-Id: I2cbec7fbc09fb4d4d31c513441c7cabbbbc5001d
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-07-21 10:25:06 +00:00
Eike Ziller
3ec87e37ee Merge remote-tracking branch 'origin/8.0'
Conflicts:
	src/plugins/todo/optionsdialog.cpp
	src/plugins/todo/todoprojectsettingswidget.cpp

Change-Id: I24ca90c2fc2cd707df901d42694df6d0e27d696d
2022-07-20 12:03:40 +02:00
Thomas Hartmann
e1b0ba2473 QmlProject: Disable or hide qmlproject related actions
Generate CMake Build files is only relevant for .qmlprojects
and should only be enabled for those.

Export as latest Project Format is only relevant for QDS and should be
hidden in Qt Creator.

Task-number: QTCREATORBUG-27935
Change-Id: Iac6ca6927443a92dfb501f76c855fd641aaf10da
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-20 09:50:15 +00:00
Fawzi Mohamed
fd89043de2 qmljs: (QString -> Utils::FilePath)++
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>
2022-07-13 17:13:23 +00:00
Jarek Kobus
a0de1f1848 QmlProjectPlugin: Don't leak action on shutdown
Detected by memory analyzer.

Change-Id: I5c1ba80e9a1e1ca620b496ebe6cd9bb600e8b800
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-29 10:09:56 +00:00
Henning Gruendl
85cd97a334 QmlProjectManager: Update landing page
* Make landing page responsive
* Use QtCreator welcome page theme colors
* Remove CMake from landing page
* Separate colors from values to make mocking data less redundant
* Add quick version to qt version check
* Use qml singleton for backend instead of using the root context item

Change-Id: Ic303d4713c348e34197716031b303720702f3e98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-24 11:48:35 +00:00
Tapani Mattila
82911d2ec3 QmlProjectManager: Add .qmlproject file generator
Task-number: QDS-6993
Change-Id: I033b0efeea87e8eab3238d3ce8d5f25752822e36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 08:06:59 +00:00
Tapani Mattila
0b404c9c7a QmlProjectManager: Load QDS landing page content when it is needed
Task-number: QTCREATORBUG-27583
Change-Id: Ib329816f7282b0c6f88d78d62a0c9f34c961e509
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-08 07:43:52 +00:00
Tapani Mattila
6b6bdd52a7 QmlDesigner: Move CMake generator to QmlProjectManager
Task-number: QDS-6898
Change-Id: Ib1ca2ff4cd17a1ee6c203878a963bf44bac6969b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-19 09:59:50 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Thomas Hartmann
de7a7b6ac8 QmlProject: Allow setting main qml file and main ui.qml file
The .qmlproject file already has the "mainFile" setting which indicates
which qml file is run. This patch adds a main ui.qml file that indicates
which ui.qml file is opened in the design mode if the .qmlproject is opened.

The patch also adds two context menu actions that allow setting the main qml
and main.ui.qml files without having to edit the .qmlproject file by hand.

Changing the main ui.qml file also checks if the current ui.qml file is
used as in the main qml file and if it is, then we switch the component there.

For now the actions are only available in QDS.

Task-number: QDS-6882
Change-Id: I1c6e19c039036dc635161fa6e06173356dc509aa
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-17 15:17:12 +00:00
Tapani Mattila
8bb1a862a0 QmlProjectManager: Integrate QDS landing page
Task-number: QDS-6564
Change-Id: Ia1a4188ba1bb561bbfeadf5fb29bcba75d05b5ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-17 11:19:49 +00:00
Tapani Mattila
92c93c388a QmlProject: Move project file pattern searches from StudioWelcome plugin to QmlProject plugin
Task-number: QDS-6930
Change-Id: I63345b539efdafa754671aef46ad808999914edb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-16 08:05:22 +00:00
David Schulz
976653cd93 QmlProjectManager: fix crash
Fixes: QTCREATORBUG-27190
Change-Id: I188930f6e5cca5d32a91e9c6ce8ca6a798273bf2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 07:28:49 +00:00
Thomas Hartmann
dfd9d4804e QmlDesigner: Track if QDS was opened from QtC
Task-number: QDS-6315
Change-Id: I4109e9c98ff5c27b4096b1af32ae945aec10c123
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-22 16:59:38 +00:00
Thomas Hartmann
8d327c1cf7 QmlProject: Add option to always open ui.qml files in qds
This patch adds an option to always open ui.qml files in
Qt Design Studio. If that option is enabled an info bar is used
to propose the option.

Change-Id: Ia80ecd87de7fcf4c5824e7a8bb806c3d4d77b935
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-24 16:01:19 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
Eike Ziller
eba4115b82 Merge remote-tracking branch 'origin/6.0'
Change-Id: I3bab4e31bc5993c59c7025ebde0846bf6c75810e
2021-11-19 10:44:15 +01:00
Thomas Hartmann
607f70f0f9 QmlProject: Use QtcProcess instead of QProcess
Change-Id: Ie80ed4bd3d831718e7f246d6b8ab9df9db8c67d1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 13:15:01 +00:00
Thomas Hartmann
dad7deccc4 QmlProject: Use fromUserInput for settings
Change-Id: Ib591c703e8badc2f12337680a788c051e1a7d974
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 11:44:10 +00:00
Thomas Hartmann
20017769c4 QmlProject: Improve warning message
Change-Id: I0b8aaa8dcb6926c9a23c297fa13a7ec4eda0089b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-11-15 13:28:34 +00:00
Thomas Hartmann
05122cc07d QmlProject: Do not allow to dismiss info bar for ui.qml files
If the info bar is dismissed ('Do Not Show Again') it will
never appear again. Since .ui.qml files are supposed to be opened in QDS
we do not want this to happen.

Task-number: QTCREATORBUG-26567
Change-Id: I236de493988c3634b56c0ac6b543f21f0bcfbec8
Reviewed-by: Kimmo Leppälä <kimmo.leppala@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-11 18:48:33 +00:00
Thomas Hartmann
ddccb87a87 QmlProject: Propose to open QDS for any .ui.qml file
This is only enabled if no QmlDesigner plugin is found.

When a .ui.qml file is opened we check for a QDS installation.
If QDS is installed we propose to open QDS instead, if not
we show information on QDS.

Search oder for .qmlproject file. QDS requires a project file.

* Check if current project is .qmlproject
* Check if the current folder contains a .qmlproject
* Check folder for .qmlproject that contains the .ui.qml file
* Check parent folder for .qmlproject ...

If not .qmlproject is found we show an error message.
Enabling external link support for InfoBar.

Task-number: QDS-5065
Task-number: QDS-5066
Change-Id: I2c70c400c4d11b83a4848f9e002e180fa119f6e2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-23 11:13:58 +00:00