Commit Graph

72385 Commits

Author SHA1 Message Date
Cristian Adam
577ad6fa3e CMakePM: Fix crash when switching CMake tools and clicking help links
The crash scenario:
1. Switch CMake tool in Kit CMake Configuration in Settings
2. Click on the "options" help link

Change-Id: Ifdb2809789748926a5ee0e127db0c87a22efa9dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:43 +00:00
Cristian Adam
869b7810db CMakePM: Add "Help" context menu entry for CMake variables
This way one could easily jump to the documentation of a CMake
variable e.g. CMAKE_BUILD_TYPE.

Change-Id: I1b348f0a1b6c18f0f7cee29ff6409b43c6263f44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:17 +00:00
Thomas Hartmann
85e3061b7a QmlDesigner: Move wizard registration to StudioWelcome
Change-Id: Iacaac80420da96f6757236db6c15ac23a6f723cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:27 +00:00
Thomas Hartmann
b8c8a6a2bb QmlProject: Add single isQtDesignStudio method
Change-Id: Idf9d07e6318af8d6934adcbc0afa3695e262836f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:14 +00:00
Alessandro Portale
a8a1f036cd Core: Explicitly detach QPalette in WelcomePageHelpers
Workaround for QPalette behavior change Qt 6.2.2 -> 6.2.3

Task-number: QTBUG-100439
Fixes: QTCREATORBUG-26981
Change-Id: If28195023929baf7dfeb2b0196c8339b84658488
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:25:30 +00:00
Cristian Adam
270d448eb1 CMakePM: Add "generator" link to the kit's CMake settings
This way the user can access all the details from the CMake's generator
documentation.

Change-Id: I90990bf7ec0062122bc3f32d611e19da8f5f9afc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:24:24 +00:00
Alessandro Portale
08535a7e63 Make share/qtcreator/cplusplus/examples compilable
Builds now, but does not link (which is fine). And unrelated,
unintentional warnings were removed.

Change-Id: I6ece33933bc20e6e36fb3859de7c2b774b0e67d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 16:21:21 +00:00
Thomas Hartmann
96ec295fc6 QmlProject: Search in content for .ui.qml files first
Change-Id: I1cf8a0bc83c24a0207e68a12a9a441cc7432a013
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 15:39:26 +00:00
Cristian Adam
d408e4c22c CMakePM: Add "variable" link to CMake offline/online documentation
This way an user can find quickly a CMake variable if needed.

Change-Id: Ie885a34321cf2ce31ee662659e669de88b28801c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 15:34:07 +00:00
Thomas Hartmann
4fa399fbcb QmlProject: Do not allow "." in importPaths
Adding the root folder to importPaths can create all kind of issues
and is not supported.

Change-Id: I03fe8924f08b11704fc472ed9cfa0b765ab7cf06
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-02-04 15:12:28 +00:00
Christian Kandeler
cfc7890416 ClangCodeModel: Create a clangd config file, if none exists yet
There are some clangd settings that can only be provided via a config file
(i.e. neither via the command line nor via LSP extensions).
In addition, clangd is very picky about that file's location; in
particular, we cannot put it at the "pseudo project root" where our
generated compilation database resides.
Therefore, we have to go with a user config file (as we don't want to
write into any project source directories). If there already is such a
file, we don't do anything, based on the assumption that the user is
familiar with clangd and has already configured it to their liking.
Otherwise, we create the file, including a special marker that tells us
it was generated by us and can safely be overwritten.
The set of options we set is currently quite small, but we expect it to
grow in the future.

Change-Id: I1605bf7b0edecc844f3e7cdd1d7dddda7af33956
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 14:23:46 +00:00
Christian Kandeler
0e7de92319 ClangCodeModel: Retrieve all kinds of clangd tweaks
Contrary to our expectation, the "quickfix" tweaks are not part of the
inline code actions after all.
User-observable effect: "Populate switch" becomes available.
Amends 8b63dfccc6.

Change-Id: I4f7fa25a58bb54dbdb470d7db064b4d804c34d26
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 14:23:24 +00:00
Christian Kandeler
0a9acad18c ClangCodeModel: Fix tooltip for clangd text mark copy action
Change-Id: Ie551971a114f1f45004a0eac0283507627c26be2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 13:50:26 +00:00
Cristian Adam
68cb80f276 CMakePM: Add options link to the CMake offline/online documentation
This way a user can quickly find out which options can be used.

Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 13:12:15 +00:00
Leena Miettinen
da95472eb7 Doc: Describe using precompiled headers in generic projects
Users can add the pch tag after a file path in .files.

Task-number: QTCREATORBUG-26610
Change-Id: I55cc6ef86c6371658845d233614bebad2a20e35d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:48:15 +00:00
hjk
75ef67615d ProjectExplorer: Remove IDeviceFactory::setCanCreate
That's implicit now by using setCreator()

The Android case looks odd as this is (and was) effectively static
information at startup. This will be addressed in a follow-up patch,
for now keep it functionally equivalent.

Change-Id: I4e6082f88dcd21379186340189acb581caef172a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:10:07 +00:00
Christian Kandeler
41fee90d8e CppEditor: Fix testing
Now that clangd is enabled by default, we must explicitly turn it off to
test the built-in follow symbol functionality.

Change-Id: Ib275893a920145868b314ce02e9dd80f656bade4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:58:52 +00:00
David Schulz
3a6dff6743 ProjectExplorer: filepathify actualTabSettings
Change-Id: I4b08b96d56bfeed0348d82bb96ff70d5f8ad583b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 11:51:52 +00:00
David Schulz
a992a3440b LanguageClient: add send configuration helper
Change-Id: If078a0354b86ca3dba5fceec94ce266424fe0c99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:42:51 +00:00
David Schulz
97e81d35df LanguageClient: always send the full list of workspaces at startup
Change-Id: I74203b7bc71982b0e6e347b004d48531a07069dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:42:35 +00:00
David Schulz
48076ce617 LanguageClient: pass BaseTextEditor to outline generator
Change-Id: Id0e123f5614f3884bf3beaeafefd0ccbd1192d55
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:42:25 +00:00
David Schulz
08e375d6f7 TextEditor: add highlighter configure based on mimetype
The default implementation configures the generic highlighter based on
the documents file name and content. Add a way to force the highlighter
to use a highlight definition for a specific mime type.

Change-Id: I1c6fca1be9bcb5c4276b5aa2dbb724680fe98ddc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:41:50 +00:00
David Schulz
348652dc26 LanguageClient: move document symbol support check to client
Used there to prevent requesting document symbols from server that do
not support these requests.

Change-Id: Icca64c41415ba7098c769854823431fb05e5ce1d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:41:14 +00:00
Eike Ziller
e24b91555b Android: Remove unused include
Change-Id: I98d59fd17dbaca1fcfdf82506ec1fe669fe86f69
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:15:24 +00:00
Eike Ziller
8e900a83e8 CMake build: Fix static build of cdbext and sdktool
Remove workaround for building statically, which was required for CMake
< 3.15. Since we increase the CMake requirement to 3.16, the /MD option
is no longer part of the CXX_FLAGS variables, so the old workaround
breaks the static build of these tools.

Change-Id: Ifc4b1c81210777e1274b4907feb3b023f7454191
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:05:31 +00:00
Christian Stenger
394bfb508f Scripts: Fix output for python 3
Change-Id: Ie914e04b25bdd4e41a9d2b3a9002385f5867ad6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 10:26:01 +00:00
Thomas Hartmann
0d812cd59b QmlDesigner: Update wizard templates
These are the latest changes from qtquickdesigner/6.0 branch.
Since 7.0 these templates are now part of qt-creator.

Change-Id: I533c005734518eaf7dcd94f3f94167d973af68a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 09:29:40 +00:00
hjk
9ff851a204 Docker/RL: Be more lazy with output decoding
Conversion to QString is often not needed.

Change-Id: I22fe0ec89419f784d2fe02245094fbe6da719f75
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:48 +00:00
hjk
7c128638ea Docker/Linux: Fix outputForRunInShell
... in case there is embedded NUL in the output.

Change-Id: Ic899bcf8d01cceed4ea6e16d4991fb80b7ac70ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 08:35:21 +00:00
hjk
9007c12a5e TextEditor: Initialize TextStyles::mainStyle
Avoids some valgrind warnings.

Change-Id: Ib93af9655149e79829b6477469554368f54e0d08
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 05:28:37 +00:00
Eike Ziller
ac41f83232 Core: Split branded logo from other resources
We only need the special resource generation for the logo. Keep the
other resources shared with Qbs, so issues like QTCREATORBUG-26969 don't
happen.

Change-Id: Ibe418dffba19e342d0aa5ff30c34409cee184fc0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-03 22:57:55 +00:00
Robert Löhning
b8b5687f21 Squish: Fix availableTargetClasses()
Amends 40caa8a4ba.

Change-Id: Ib48a70fa641c5d3c65f53aad2dd1ce8fd3abce54
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-03 17:49:44 +00:00
Christian Stenger
4e716c0db5 Squish: Fix unknown global variable
Amends 40caa8a4ba.

Change-Id: I014210c2035fa0a69ca273718df726a523a23786
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-02-03 17:49:35 +00:00
Cristian Adam
8d12fd07e2 CMakePM: Rename "Additional CMake parameters" to "... options"
CMake documentation calls them Options, and we should use the same
terminology.

See https://cmake.org/cmake/help/v3.22/manual/cmake.1.html?#options

Change-Id: Ibb8ed9dd5a830290770a7fa89e7e5e1ce2d8c74a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 17:46:20 +00:00
Cristian Adam
633a9a04e2 CMakePM: Add "Kit Configuration" button in Settings page
This "Kit Configuration" button opens a dialog with the kit's
CMake settings.

This way a user can change all CMake related settings in the
project's Settings page.

Change-Id: I76b6e69ea7a9b96823f6583aef007cf413410407
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 17:18:30 +00:00
Christian Kandeler
b243a8d728 Wizards: Modernize qbs project templates
Change-Id: Ib6f6315f9730425d4fd3b566f66ed26aa1718695
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 15:40:33 +00:00
Eike Ziller
9bc9fb5a0d Fix avdmanageroutputparser test
- There is no PLUGIN_DEPENDS for tests, and it wouldn't work anyhow
  because of duplicated symbols. It was interpreted as a dependency and
  the test disabled because no such target exists.
- Move the platformNameToApiLevel(...) function to
  avdmanageroutputparser.h to break the dependency to a lot of Android
  support code.

Amends 78da7e2922

Change-Id: I6933684a76e5291d415c72388caa3df2bee7cbfb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 15:31:13 +00:00
hjk
1e34d6ee22 Debugger: Fix autodetection
Fixes: QTCREATORBUG-26978
Change-Id: I32585251d47729f7fde9ee6e707d9e9cfed4c1a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 14:38:43 +00:00
Christian Kandeler
92156cc1d6 LanguageClient: Indent code coming from the server
... if the client implementation requests it.
The server is not necessarily aware of our indentation style, so we
might have to apply it to the newly inserted code.

Change-Id: I43518575c7124568da42be3b04a28d7f352f6dc2
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-03 14:30:19 +00:00
Jarek Kobus
f5b946abbe LinuxDevice: Implement runProcess()
Change-Id: I5300d36119ffb9fdd82a2ba7e02f76edc0fe2eda
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 14:20:18 +00:00
Christian Stenger
9a5cb5896e Tests: Fix cmake file
Change-Id: Iebe454bee2037c0d150d5ea537419044745abc10
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-02-03 14:13:39 +00:00
Christian Stenger
eb2fc79a3f Docker: Fix handling of ui applications on macOS
Using graphical applications inside a docker image needs
the same handling on macOS as on Windows.

Change-Id: Ic9fb6a8330164f7acdaab4146a70e7e308192f4e
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 14:13:22 +00:00
hjk
748cc38c26 BareMetal: Allow stlink_version to stay unspecified
Fixes: QTCREATORBUG-26928
Change-Id: Ia6dedb62c1e41472e176d8d247c7967fe5a430ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 13:42:03 +00:00
Thomas Hartmann
ca5d52dcd6 QmlDesigner: Update studioplugin.metainfo
These are the last updates from qtquickdesigner/6.0.

Change-Id: I81302a42f4dfb3da6379eea0e5d2a3f09a2c9e7e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-03 11:30:19 +00:00
hjk
5af00873cf FakeVim: Support backslashes in substitute command patterns
Change-Id: Ibfcea7fdc550082e4975e1fc4d2fba6563dbfd02
Done-by: Jochen Baier
Fixes: QTCREATORBUG-26955
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 11:25:12 +00:00
Christian Kandeler
2f925e2098 qbs build: Update minimum qbs version
Change-Id: If734b0051b98c8d3963afa54ad66b9b990db2a88
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-03 11:16:55 +00:00
Mahmoud Badri
10fe71546c QmlDesigner: Implement renaming assets folders
Fixes: QDS-6123
Change-Id: I1923f78fe2a6739f1cf32fd86c0919965190d8ca
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-03 10:58:29 +00:00
Mats Honkamaa
4e10170ccd Update loginui examples folder names
Folder names need to start with capital letter.

Task-number: QDS-6160
Change-Id: I5a77e693f9bfe0d85775a7b1e71ad9d0081025a2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-03 10:40:05 +00:00
Jarek Kobus
239688180d Fix running as root
There is no need for TerminalRunner::setRunAsRoot()
as debugger is already being run as root.
Implement runAsRoot for non-terminal QtcProcess, too.

Fixes: QTCREATORBUG-26964
Change-Id: Id5110db86b7b809a5608714464241cee73875f2b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-03 10:23:25 +00:00
hjk
9b7f580a14 WebAssembly: Move auto-detection into stand-alone function
Change-Id: I641946e62998371e6e45b6c6d75e069b8729eaa6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 10:16:06 +00:00