Commit Graph

49976 Commits

Author SHA1 Message Date
Christian Kandeler
8ad7ab2d2a ClangCodeModel: Use project-specific clangd client, if possible
If we open a file that does not belong to a currently open project, there
is a good chance that the current project's parse context is a better fit
for the file than the fallback client's.

Fixes: QTCREATORBUG-26697
Change-Id: I6c17e275b047602c51364f3203b3f0a3e74a49fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-18 11:37:34 +00:00
Henning Gruendl
3d56b8b54a QmlDesigner: Fix creation date issue on macOS
On macOS the creation date was not according to the date/time when the
example was unzipped it was rather the date/time when the example folder
was zipped. By removing the already existing folder and create it again
to hold the content of the zip archive this issue should b circumvented.

Task-number: QDS-6288
Change-Id: Icf18c4fcddcacf69feeca536f6d0e81f4c126afe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-18 11:34:25 +00:00
Tapani Mattila
1d06032453 CMake Generator: Fix modules with nested imports
Task-number: QDS-6220
Change-Id: Icdb37b5b856af369a8d6a0e00a02ae469116864a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-18 11:11:54 +00:00
Thomas Hartmann
abf1ec7cdc Open only designer related project files in Design Studio
DocumentManager::setFileDialogFilter allows overriding
the open Project/File filter. In QDS we only allow the relevant suffixes.

Task-number: QDS-5825
Change-Id: I6cdc0f15628a215edc41cdaeb485bd17e08ef4ec
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-18 11:10:22 +00:00
David Schulz
844a5e624a Editor: make sure to cleanup select all future watcher
Change-Id: I39e1bc7926905684601eb72cdd7a4357c708c432
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-18 11:04:51 +00:00
Henning Gruendl
61d5bbbdad QmlDesigner: Fix example download missing setting
When starting with a clean config the location for download/extraction
of an example is empty. The first call to the settings needed a default
location.

Change-Id: I2d63f805dc46c564f13346648f3e3bf29a0970d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-18 11:00:43 +00:00
Christian Kandeler
59fb0e9c9c Core: Properly handle file path arguments with -client option
These paths come from the user, so the separators must be translated.

Fixes: QTCREATORBUG-27075
Change-Id: Ia20c2662d30626b8b7ed3dd19afb64a43c8a716f
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>
2022-02-18 10:33:53 +00:00
Christiaan Janssen
2834e90930 McuSupport: split mcusupportoptions
Several independent classes were mashed together in mcusupportoptions.cpp
This patch moves McuToolChainPackage together with McuPackage,
McuTarget to its own header+source pair, and
McuKitManager to its own header+source pair.

Task-number: QTCREATORBUG-26890
Change-Id: I0b51da4e1cae5a976201dffd290a665eaa318b33
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-18 09:14:29 +00:00
Christian Kandeler
a08e0f7a9d ClangCodeModel: Differentiate between clangd debug output log levels
Depending on the kind of highlighting issue we want to debug, we may or
may not be interested in the actual tokens.

Change-Id: I412126d3e97949a31f1dd5f339dc09072f28be64
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-18 08:55:54 +00:00
David Schulz
088d692bb2 Editor: fix crash after triggering select all with no search results
Change-Id: I32d5172e8b5df6db93053f358c5a72cb8d38f6ea
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-18 08:09:14 +00:00
Leena Miettinen
1f3e6b4c7a Android: Fix punctuation and wording of messages
Task-number: QTCREATORBUG-27055
Change-Id: I4180717163ec52a405c40e1a932713dda27c3f38
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-18 07:27:41 +00:00
Christian Stenger
e4ff13e529 StudioWelcome: Fix compile
Amends 5d660d7afe.

Change-Id: I8d7239f2b57274c062cb2f9f535d274f5e149288
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-18 06:10:18 +00:00
Leena Miettinen
3805bec91f C++ Editor: Fix UI text capitalization
Task-number: QTCREATORBUG-27055
Change-Id: I148cfb7b9628ab2460050c1127b6557b8830983b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-17 14:34:19 +00:00
Leena Miettinen
b2d90241fe Log Viewer: Fix UI text
Also update the string in the documentation.

Task-number: QTCREATORBUG-27055
Change-Id: Idce699a7796e7cb55d8218c105ec851c369cef7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-17 14:23:29 +00:00
Henning Gruendl
f7cbc513aa QmlDesigner: Add missing context pointer connect
* Add missing context pointer in connect statement
* Fix console output "QFile::remove: Empty or null file name"

Task-number: QDS-6170
Change-Id: I31f671dc1422c6b90aff81252f4bc4cf2c34e7d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-17 13:11:46 +00:00
Henning Gruendl
5d660d7afe QmlDesigner: Add examples download path setting
Add a PathChooser to StudioSettingsPage which enables setting the
location to which the QtDesignStudio examples are extracted.

Task-number: QDS-6174
Change-Id: I99232edf3c1200a84daaadf4a0d118317a5ea009
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-17 13:11:39 +00:00
Leena Miettinen
0064dda2c0 Remote Linux: Do not use contractions in UI text
Task-number: QTCREATORBUG-27055
Change-Id: I7fbc6374c910fa81900a10432892c10afb0ea6d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-17 12:12:31 +00:00
Leena Miettinen
99ceebe695 Debugger: Remove extra words from tooltips
Task-number: QTCREATORBUG-27055
Change-Id: Ic7b447da2de3267ad897cdef0275a2faa4474099
Reviewed-by: hjk <hjk@qt.io>
2022-02-17 12:12:02 +00:00
Leena Miettinen
eb8d84f6de Docker: Fix UI text caps and punctuation
Task-number: QTCREATORBUG-27055
Change-Id: I6b5c2bbd36e34d4444b798e2e5040bff674ad02a
Reviewed-by: hjk <hjk@qt.io>
2022-02-17 12:09:23 +00:00
Leena Miettinen
e4b39e0ce4 CMake: Fix UI text
Task-number: QTCREATORBUG-27055
Change-Id: I53a3ece8b6180afa4fbcbc474cc980aced5f55c8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-17 12:08:59 +00:00
Leena Miettinen
4f3d3d445c Project Explorer: Fix UI text
Task-number: QTCREATORBUG-27055
Change-Id: I9b0e4f02ea7d1ebb14a9581f21c76b8908589334
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-17 12:08:37 +00:00
Leena Miettinen
1a90f06fe5 QML Designer: Fix UI text
Fix capitalization of strings and the wording of tooltips.

Task-number: QTCREATORBUG-27055
Change-Id: Id8e324b44574b9cf0d1522ae204b452cea6193cd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-17 12:05:26 +00:00
Thomas Hartmann
d0852fb2a1 StudioWelcome: Remove unused code
Change-Id: I380a35cb735669feeeac5d0293ed43c4d2ef7059
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-17 10:46:22 +00:00
Thomas Hartmann
1fa9034aca StudioWelcome: Avoid opening two projects on double click
This issue was introdced because we do not go to the edit mode after
opening a project. We stay in the WelcomeMode until the project is
loaded. Since the recent project list did change a second click
(aka double click) will open a second project.

We now block the update of the model for 1000ms and also block opening another
project for the same duration.

Task-number: QDS-6286
Change-Id: I52ed6aa3686594b63fe4a6134c6db1287bca1dcb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-17 10:45:53 +00:00
Thomas Hartmann
0d319ac3a1 QmlDesigner: Fix loading of .metainfo for versioned folders
This fixes a regression introduced by 7ea6492a17.
Since we actually check if import folders exist,
we did not take versioned folders into account. e.g. 'MyPlugin.1'
Extended and cleaned up the manual test case.

Task-number: QDS-6078
Change-Id: I3235d8fe498745903c5ca897e25e3d43222c119f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-02-17 10:45:37 +00:00
Mahmoud Badri
c8481710c9 QmlDesigner: Enable searching in the text editor
Also hide the bottom status bar when it is empty.

Task-number: QDS-6187
Change-Id: I053771243c268ea20df8e127831b789b854021aa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-17 10:45:01 +00:00
Erik Verbruggen
c755de0823 McuSupport: Move kit methods out of McuSupportOptions
... and into McuKitManager

Task-number: QTCREATORBUG-26890
Change-Id: Ic5ed689458d3ef004ebb42a549c48a6326c2f45d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-17 10:41:59 +00:00
Christian Stenger
59e90a439e StudioWelcome: Fix qbs build
Change-Id: I37c5f2df2480fd1357a55d36744330534385b68e
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-17 07:01:18 +00:00
Henning Gruendl
4b7ab40ed0 QmlDesigner: Add private api to narrow down bug
This is only a temporary patch to narrow down a bug in QtDS.

Task-number: QDS-6239
Change-Id: Icf9cde008179174fd79fb92a92372fb2b541068b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-16 18:33:29 +00:00
Alessandro Portale
2cd7d89ec5 Android: Remove a cast in AndroidDeployQtStep::init
Don't do an additional dynamic_cast.

Change-Id: Icf3beda4e78bc03232689439e8ba264287b603ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-16 17:17:44 +00:00
Christiaan Janssen
6e96480154 McuSupport: remove legacy support for 1.x SDKs
Task-number: QTCREATORBUG-26891
Change-Id: I011649b051c6c4c9b954b1c782685e404c3796fe
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-16 13:50:14 +00:00
Eike Ziller
209ecc91a0 CMake: Fix configurations tab bar appearance
A tab bar should span completely above the group that it "tabs", and
have no spacing to it. Otherwise there are funny visual artifacts, and
the visual correspondance is not clear.

Add an option for spacing to LayoutBuilder for that.

Change-Id: I5ca9dc713fff95599c9ec1cf90abe8473bc67c2a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-16 13:38:41 +00:00
Christian Stenger
282c3d0dab LanguageClient: Do not send initializing request twice
Amends dc268e3157.

Change-Id: I6ca81ec336f09c02b26f47b5e00bebbc54882ed6
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-16 13:07:59 +00:00
Piotr Mućko
76453511cc McuSupport: plugin code formatting
Change-Id: I2d1c3dfad3fddce7706056997d284292e13d3ad2
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 27cadc86ba)
2022-02-16 11:18:28 +00:00
Christian Kandeler
3f0cf6d6ac CppEditor: Do not consider generated access specifiers
... when looking for places to insert class members.
Apparently, these can come from other translation units and thus have
invalid offsets.

Fixes: QTCREATORBUG-27063
Change-Id: Ia9a318284c0a8f4dd280315a5b47eac7ffd96a30
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-16 10:10:50 +00:00
Piotr Mućko
7fedb56c65 McuSupport: make package status enum class
Change-Id: I6d52e8e25e9934683371246ba05612f4f17450c1
Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-16 09:20:31 +00:00
Thomas Hartmann
3dce9690d7 StudioWelcome: Settings for hiding/showing menu entries
Change-Id: I08bc299e9ce32bde2976dcd901babf91a9a1598c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-15 19:57:07 +00:00
Miikka Heikkinen
358b21ce9c QmlDesigner: Fix on-drag binding of created nodes to properties
Generic matching for dragged item to bindable properties didn't work
properly, missing appropriate matches. Now supported cases are
hardcoded with the expectation that in the future this will be handled
via metainfo hints.

Also fixed related issues with dragging images and shaders into
navigator.

Fixes: QDS-6198
Change-Id: Ide9360ef037997cbb388f4c2db35b79eded67aa6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-15 15:22:52 +00:00
Miikka Heikkinen
6173b78860 QmlDesigner: Allow going into component from item library
Added "Go into Component" to item library context menu for items that
have customComponentSource available. Doubleclicking on the item also
does the same.

Fixes: QDS-5786
Change-Id: I954bfb4864d74fa04b5da5b961f9aa2035132022
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-15 14:43:47 +00:00
Thomas Hartmann
b0589fb8fe Add options to hide and configure main window
These options allow to hide certain main menus
and move options to edit.

This allows hiding those menus in the Qt Design Studio context.
The options are separated so that power users can enable
Debug, Analyze and Tools.

HideBuild=true
HideDebug=true
HideAnalyze=true

Change-Id: I26758aaa965bb7b61a476d197d82db34e62003b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-15 14:37:29 +00:00
Henning Gruendl
7dc82dace6 QmlDesigner: Add guard pointers to connect
Task-number: QDS-6239
Change-Id: I08a21a8c431046b846d0b41265d8665e93afa0a9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-02-15 14:25:57 +00:00
Christian Kandeler
dad534005e ClangCodeModel: Do not set C_ENUMERATION for enum declarations
... when highlighting with clangd.
This value is only meant for enum values, not types.

Task-number: QTCREATORBUG-27059
Change-Id: I7bb68f5deb6bb215ee3c23d995207019850a7bfc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-15 13:58:51 +00:00
Christian Kandeler
6414f22be7 ClangCodeModel: Fix highlighting of literals with clangd
Some literals are keywords.

Task-number: QTCREATORBUG-27059
Change-Id: I6315bfd4e4179990e55bc046084fdf0a4e3f9e8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-15 13:58:36 +00:00
Christian Kandeler
a189a74dea ClangCodeModel: Fix erroneous highlighting with clangd
In certain cases, members being initialized were highlighted as output
parameters.

Task-number: QTCREATORBUG-27059
Change-Id: I0de8aee5e4db735251a314b14af04459e6ac772c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-15 13:58:17 +00:00
Piotr Mućko
b1f35bf905 McuSupport: Extract target description to separate file
Change-Id: Ia79d64b5b5a752bdacb404b49e8ac78c2d32ee4e
Reviewed-by: hjk <hjk@qt.io>
2022-02-15 13:53:28 +00:00
David Schulz
dc268e3157 LanguageClient: log exit notification
Add a private function that logs and sends a basemessage without
checking the current server state and use it for server init,
sendContent and exit.

Change-Id: I6532dfb36ef5bf4d036bb71dbfab4ab29497fc9a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-15 13:37:52 +00:00
hjk
91fcec3d79 Docker: Remove unused DOCKER_RUNFLAGS
Change-Id: I42ba6ca949d7397be73b2ede6d9380f6f93e7434
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-15 12:21:12 +00:00
Piotr Mućko
9917166b2e McuSupport: basic test & required refactoring
Introduced Package interface for mocking purposes.
Made some functions visible in headers for testing.
Added basic test skeleton for mcu plugin.

run cmd: `qtcreator -test McuSupport`

Change-Id: I1011d49052bd8c894da393d8a285b241682f1f94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-15 11:03:30 +00:00
Christian Kandeler
03340f1fdf ClangCodeModel: Fix flaky clangd test
Signals emitted for the fallback client got in the way.

Change-Id: I29a7fe5221a1f489eff91c772f9a6bb0fff7c4f1
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-15 10:39:03 +00:00
Christian Kandeler
d465dd9f3b ProjectExplorer: Linkify main diagnostic location in MSVC output parser
Task-number: QTCREATORBUG-27056
Change-Id: Ide66fd1ee9c8312653146cfa4a17ec6f662a7949
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-15 08:53:45 +00:00