Commit Graph

62421 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
hjk
2be0fc2537 ProjectExplorer: Use CommandLine instead of Runnable
Lighter and sufficient for all use cases.

Change-Id: Ic6749a1a9e3e6906ce71b87b237cc94a6d8a4cbf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-03 10:15:44 +00:00
Cristian Adam
bc160ebe63 CMakePM: Revert selectedRows back to selectedItems
As it turns out changing to selectedRows resulted in having
the keys copied twice to clipboard.

The change would require some code adaptation.

Amends 0020ef7e30

Change-Id: Ie1decd154f7d22825f4d4eecd0bf544ecac7aa26
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-02 21:21:26 +00:00
Alessandro Portale
ccafc11fa6 Utils: Remove unused theme role TextColorHighlight
TextColorHighlight is a harsh "egineer red" #ff0000 in all themes except
one, where it is grey. Actually, TextColorHighlight was used in one
place, which now instead uses TextColorError.

Change-Id: Idcd61637edaa045fc718cf35a9d34ff1d5a64dad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-02 21:19:03 +00:00
Cristian Adam
0020ef7e30 CMakePM: Settings list UI changes
The CMake parameters QTreeView has now:
- alternating row colors
- row selection

Both key and value get the same font and foreground stylings.
- bold when the key is new or the value has been changed by user
- italic when the key has been inherited from kit or initial config
- red when there are differences between the inherited value and
  the current value

Change-Id: If09bb2c3e25f59938c5f56e6dd0d6817dfe442cc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-02 20:20:00 +00:00
Eike Ziller
779c59a3e6 CMake build: Fix missing tool button icon
- for the branding feature CMake uses a different, generated qrc file
- move the Qt logo out of the Qt Creator logo files, it doesn't belong
  there

Amends 5eafa345ed

Fixes: QTCREATORBUG-26969
Change-Id: I6f3d87abd52810d42142073ac944e6553c38caf1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-02 10:57:46 +00:00
Alessandro Portale
8f288bd7e4 ProjectExplorer: Improve layout in TargetTripleWidget
This gives the triple lineedit a bit of stretch.

Change-Id: Ib1742bc39c64b797b86e1740650a177689657557
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-02 10:21:46 +00:00
Thomas Hartmann
87663b6866 QmlDesigner: Fix performance bottleneck in navigator
NavigatorTreeModel::filteredList is relativly slow and it is frequently
called by ::index and ::rowCount.
We introduce the cache and also improve appendForcedNodes
to avoid quadratic blow up by using a set.

Task-number: QDS-6110
Change-Id: I83b860158ad2cdc1c83a9e8a72b2d13781e91f86
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-02-02 09:52:06 +00:00
Eike Ziller
bd095d1ebe Merge remote-tracking branch 'origin/7.0'
Change-Id: Ic646cdb2a14e5a2638ff88a922067dcf378dde5b
2022-02-02 10:47:20 +01:00
Eike Ziller
1368111824 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: Ie2b23daa457c2aed635a784963bc1e95740bd076
2022-02-02 10:17:03 +01:00
Eike Ziller
1221552377 Require CMake 3.16 and remove workarounds
CMake 3.16 is available on the major Linux distributions nowadays,
so we can get rid of some workarounds.

Change-Id: I32500375748f33c3e40fbd7a08824d823f817a8f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-02 08:55:31 +00:00
Eike Ziller
275dcc8f8a File System view: Select root folder when clicking outside item
If the shown items are not filling the whole view, there is some empty
space at the bottom. Select the current root directory when the user
click there.

This avoids funny behavior. Without that change
- select a file or subdirectory in a directory
- collapse the parent directory
- the selected file or subdirectory stays selected, but that is not
  visible
- right-click into the empty space at the bottom
- the context menu for the not-visibly selected item is shown
- this is especially weird when e.g. choosing "New Folder"

That is not an issue if the view fills the whole space, because then a
visible item is selected when clicking.

Change-Id: I0c65e091e659c20d7b384e96ecf69c36379ed936
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-02 08:54:39 +00:00
Eike Ziller
a4b3085acb Fix issues with "Select All" (search results)
- the shortcut Alt+Return conflicts with "Trigger Refactoring Action"
- display the shortcut in find toolbar button's tooltip
- no need to repeat the default shortcut (it's the same Command)

Change-Id: Ifd1e56ba091806901241bdca66c42a332574bc0c
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-02 08:54:21 +00:00
Christian Stenger
075ebb932e Modeltest: Fix shared files
Replace deprecated and removed enums.

Change-Id: I9c374fab7662f181be5fe613d39afff963318315
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-02 06:29:41 +00:00
Cristian Adam
9c8f46a173 CMakePM: Add "Appy Kit/Initial Configuration Value" context menu entry
Now the "Initial Configuration" and "Current Configuration" displays
in red the mismatches between kit / initial value and respectively
initial and current configuration values.

By having a "Apply Kit / Initial Configuration Value" context menu
entry the user can resolve the mismatches if needed.

Change-Id: I2e272821c3ba396cd8a6b7c81e1437cb3fd4bbad
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-01 20:27:41 +00:00
Cristian Adam
dc825e11bd CMakePM: Fix "Reset" on changed values in Settings
Previously the reset button would only work on new items being removed.
User changes on existing items would not be reverted.

Change-Id: I8d9bde058487c9568bfb802f131a29ec32fc1f8c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-01 19:10:50 +00:00
Katarina Behrens
dbfd226e85 Imageviewer: zoom in and out using fixed set of common-sense zoom values
Previously scale factor for zoom in/out was calculated as

$(currentScaleFactor)^1.2

This results in weird zoom levels such as 83.3% or 144%. Replace this
approach with using pre-defined set of 'normal' zoom level values
such as {25%, 50%, .. 100%, 150%, 200% .. }, similar to what most
graphic editors do

To find the nearest greater or lesser fixed zoom level for any given
floating point scale factor I borrowed some code from qmldesigner/
timelinewidget

I didn't know what to do with zooming using mouse wheel so I left the
old code in place

Change-Id: Id037ef99f89cce5e8dcd58bb9ad0e6f3c8536f36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-01 17:11:30 +00:00
Alessandro Portale
3740f04dd0 Core: Cleanup in ListItemDelegate::paint
Do some stuff only if animationProgress < 1.

Change-Id: Ib864cae64e8454ea7ad71f872d572a72d4e0c893
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-01 12:50:25 +00:00
Assam Boudjelthia
95627ce10f Set NDK list vertical size policy to maximum
And remove the spacer under the NDK list buttons.
Let the NDK list take less vertical space.

Change-Id: I4bd8769c45ddfbaaf34257b964a534c85de0e2fd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-01 12:49:22 +00:00
Assam Boudjelthia
328886ed4d Show Android api 32 as Android 12L
Change-Id: I48122062de4ce3bc092089d73d7bbae5abced73b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-01 11:50:04 +00:00
Christian Kandeler
8b63dfccc6 ClangCodeModel: Make clangd refactoring actions available
Introduce an assist processor that merges our built-in quickfixes with
refactoring actions from clangd ("tweaks").
For now, we make it clear which ones are coming from clangd, and we do
not filter duplicate functionality. In the future, we might want to
disable redundant built-in actions if clangd is enabled for the
respective file.

Change-Id: I04842132798c8635dfddf8cfc98cc7a6313fac09
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-01 11:02:53 +00:00
Alessandro Portale
64dea33250 Welcome: Fix scrolling in the sidebar
Some items did not move when the sidebar got scrolled. This change
assigns them the right parent widget, so that they also scroll
correctly.

Fixes: QTCREATORBUG-26956
Change-Id: I28c131ffaa867652a4d9e282566f7986a0df9383
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-01 10:59:23 +00:00
Jarek Kobus
39d078700a Fix a warning about wrong RunControlState transition
The warning was issued when re-running from output pane.
According to RunControlState class description
the transition from Stopped to Starting is a valid one.

Change-Id: I264630dc1c23c359ff4e9d4a7a292b9b0c55ec5a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-01 10:57:46 +00:00
Jarek Kobus
fe4156de43 SshDeviceProcess: Fix handling finished() signal
We can't disconnect all signals inside
SshDeviceProcessPrivate::setState() since it will also
disconnect all external slots from *this signals.
The original intention was to just disconnect from
finished() signal to *this slot.

Currently there are two connections to finished() signal:
one is internal and one external. In order to guarantee
that the internal one is always invoked before the external
one, we need to do the internal connection first - so we
move the connection to the constructor. In addition we
introduce the ignoreFinished flag. The true value means
the connection is disconnected. So, instead of connecting
and disconnecting dynamically we change the flag accordingly.

In case when handleThisProcessFinished() was called we
don't emit a finised() signal from handleProcessFinished()
since this signal is going to be delivered for all other
external slots anyway after handling of
handleThisProcessFinished() finishes.

Amends 9ec997b376

Change-Id: Iae12c10251de242391c03d185a0856f421b99fe4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-01 10:52:24 +00:00
hjk
2d0225d978 ProjectExplorer: Fix re-run from the output pane
Amends 18fdad280a.

Change-Id: I6c21ad35282d008b70bdb1e0dbf06deaba5f9829
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-01 10:51:11 +00:00
Assam Boudjelthia
ef003ba769 Android: Simplify SDK setup process by minimizing number of dialogs
SDK setup process currently downloads the SDK tools, then checks
the mandatory packages, asks the user if they want to install them,
then show a dialog with package details, then asks again whether
the user wants to check the licenses.

The following two steps are redundant because there's a dialog which
guards the package installation and waits for user's input:
* Asking the user if they want to install the mandatory packages
* Asking the user if they want to verify the licenses

Change-Id: If06c0adea9444107a149c3ec32be67061954d1bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-01 10:31:18 +00:00
Christian Stenger
ccb44a310c QmlDesigner: Fix compile on macOS
Amends 25fa5540ea.

Change-Id: I2a71e79b6a5f41196d559724da78f98d0af7cdeb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-01 09:19:38 +00:00
David Schulz
fe0352669d Revert "macOS: Fix Delete with Google Japanese IME"
This reverts commit 5a3648c895.

Reason for revert: breaks other shortcuts like shift+del to cut the current line under the cursor

Change-Id: I5313c66df9dfa4283cc3f84ce9e7fd5464d0f73e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-01 07:06:26 +00:00
Alessandro Portale
e58f50df2a Android: Remove html code from tr-strings in keystore creation dialog
This change removes markup with its unthemed color values from
translatable strings. Terminates error messages with a ".". Adjusts the
message strings in the .ts files, accordingly.

The error label is changed from QLabel to Utils::InfoLabel.

Change-Id: Ifdd65de8d9e0ae311b494e70b9dc77ca0a3e4f46
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-01-31 21:45:28 +00:00
Cristian Adam
d5eed0480d CMakePM: Save initial configuration changes on "exit"
Previously the changes to "Initial Configuration" would be done only
after pressing "Re-configure with Initial Parameters".

Now the settings are saved when the widget is closed:
- a different kit is selected
- a different build type is selected
- project is closed
- switch between build and run settings

This way the changes are not lost.

Change-Id: Ia2c1c10c59bfa101332066205f98684843266f94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-31 16:43:04 +00:00
Cristian Adam
a7d3f9fdba CMakePM: Display current value in CMake settings as tooltip
If you change the value of a CMake parameter in CMake settings the
new value was not displayed in the tooltip, the old value was.

Change-Id: Ie182ef42f8bf48651d170da8054d7f60f9080088
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-31 15:14:07 +00:00