Commit Graph

74059 Commits

Author SHA1 Message Date
Jarek Kobus
35cde5ddae Introduce IDevice::bytesAvailable()
It's going to replace RemoteLinuxCheckForFreeDiskSpaceService.

Change-Id: If8c30a57b9013387c69412f12102bcd4d41a88b5
Reviewed-by: hjk <hjk@qt.io>
2022-01-05 14:33:50 +00:00
Knud Dollereder
e0cd140c78 Display timelines for the current state only
Fixes: QDS-1493
Change-Id: Ic089ef0b1dbd2eba3f470a02b1152a15ac1df398
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-01-05 13:04:21 +00:00
Cristian Adam
3c7d0c5c98 CMakePM: Remove grouping of cmake cache variables
Having groups made from the first underscore is not necessarily
helpful.

In some cases it creates empty groups, which can confuse users.

We have filter and search functionality in the list, which can
help with finding the right items.

Fixes: QTCREATORBUG-26218
Change-Id: I751a59b49184ea57f55d3832ef4edc8a3c33e0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 13:04:19 +00:00
Cristian Adam
e12d7e863c CMakePM: Allow "Force to ..." context menu entries also for keys
Previously the "Force to ..." context menu entries were enabled
only for the items on the second column (values).

There is no reason not to have the same behavior for the items
on the first column (keys).

This way the user doesn't have the impression that something is
wrong if they trigger the context menu on the key and not on
the value in the list.

Change-Id: I02fcaf25340f2dbcbb808be8f27047acaaee5471
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 13:03:45 +00:00
Marco Bubke
f5543a2960 QmlDesigner: Move preview generation to projectAdded
Change-Id: I398cc253dc86fac97c8096dc1a06368d0bede27d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-05 12:37:24 +00:00
Knud Dollereder
9f017f46b7 Respect the current state
When creating a new timeline, do this in the current state.
When refreshing the formeditor, do not change to the base state.
Use the views major version number instead of hardcoding it.

Change-Id: Idab1b91ae5a2bcf971487b09b0622fce2fd14f67
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-01-05 12:00:06 +00:00
hjk
e44403a5c6 Sqlite: Fix qmake build
Amends ad505aad59.

Change-Id: Ifab9430c21a6b946a8d4fa9ac0e743af7d016018
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 11:21:31 +00:00
Samuel Ghinet
0db5aa1e8e QDS New Project dialog: Add scrollbar to Styles list view
The scroll bar becomes visible only on hover -- i.e. when the mouse is
over the list view items.

Also, extracted the ScrollBar item from Details.qml (and now Styles.qml)
into VerticalScrollBar.qml which I put in StudioControls. This is almost
identical to the VerticalScrollBar.qml from HelperWidgets -- the only
difference, the one I created here also supports "show bar only on
hover"

Task-number: QDS-5500
Change-Id: I7692cdbc0892086783a89d0bb397a112eff46630
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-05 10:29:11 +00:00
David Schulz
e478c915ad Editor: fix maybe select lines
Only select the lines if the cursor has no selection. If we have
multiple cursors with a selection the user most probably want to copy or
remove this selection.

Fixes: QTCREATORBUG-26761
Change-Id: Idbf36a878e3d56ea34542b5de390c547bd8bcd6b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 10:26:39 +00:00
David Schulz
a09d4e2918 Python: fix repl workdir
Use the directory that contains the file not the file itself as the
working directory for REPL.

amends 4a42bcd4e8

Change-Id: Ia81efc3ef51a96a79918d358cd446de9f1ea082d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 10:25:04 +00:00
Thomas Hartmann
22a2693917 QmlDesigner: Expose image provider for project preview
Task-number: QDS-5866
Change-Id: I4e8416cc321dbd068235a560e4a3aa1ff5aa2699
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-01-05 10:09:44 +00:00
Artem Sokolovskii
aafb5cb9a3 RemoteLinux: Move test actions to special test dir
Change-Id: I9be4a1e7de1ae1accc507109bcf5f3b6188a8925
Reviewed-by: hjk <hjk@qt.io>
2022-01-05 09:57:10 +00:00
David Schulz
02535d6bf8 Editor: fix select all
Prevent scrolling to the end of the document after triggering select
all.

Fixes: QTCREATORBUG-26736
Change-Id: I744dddee87ac16ae2399d37483552fc6b535df46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 09:10:35 +00:00
Leena Miettinen
6635678a1c Doc: Update screenshots
The instructions for the following options pages have already
been updated:

- Tools > Options > FakeVim > General
- Tools > Options > Code Pasting > General
- Tools > Options > Testing > Qt Test

Fixes: QTCREATORBUG-26608
Change-Id: Ia0c245239bb993a5eed47c821d2390d3f0cb33c2
Reviewed-by: hjk <hjk@qt.io>
2022-01-05 08:14:36 +00:00
Eike Ziller
ea7b75bd2f Fix shortcut for File > New Project
There was a conflict with a similar action in ProjectExplorer. Make the
command the same.

Fixes: QTCREATORBUG-26780
Change-Id: Ide831d103e5c2d1b9efd9cd01ce81c0abf5545a1
Reviewed-by: hjk <hjk@qt.io>
2022-01-05 08:03:32 +00:00
David Schulz
97a5a24a17 Core: add action to select all find results in an Editor
Change-Id: I71f480abde17cfdb6b64d7d12a33c9887792fc61
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 05:59:56 +00:00
Cristian Adam
ec07bf8f7c Revert "UnitTests: Disable some ClientServerOutsideProcess tests"
This reverts commit c22c22c3d6.

Reason for revert: With d65e47b5c6 the tests are passing.

Change-Id: Ide9c12e38c229315364489123f687b50632ffed8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-01-04 18:58:05 +00:00
Cristian Adam
d65e47b5c6 Revert "Use QtcProcess for clangbackend"
This reverts commit 8724a4efbb.

The above commit made code completion 3-4x slower on Windows, and
8x slower on macOS.

Fixes: QTCREATORBUG-26754
Change-Id: I02424a40e10de2baf3fd01f19f9094c8e82f684a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-01-04 18:01:57 +00:00
Marco Bubke
3e585483c9 QmlDesigner: Check if callback is not null
The AsynchronousImageFactory is not interested in any callback. So it
is providing null callbacks. If they are called there will be a crash.

Change-Id: I252301e4289185e50720849a7cb148d8f1da3e7d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 17:38:17 +00:00
Thomas Hartmann
cb8bbab171 QmlDesigner: Remove item for Qt 3D Studio
Change-Id: I55abc2365d1b2232048f7df15b25e0f91abb30fe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 15:50:06 +00:00
hjk
70a9b3deae ProjectExplorer: Do not attempt to stop application
... when the user selected "Keep running".

Change-Id: Ia6f6306f9a3c88d4bd35aaf079576dafc54b6323
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-04 15:20:31 +00:00
Eike Ziller
1e46db88a1 Do not link packages against libGLX and libOpenGL
Also for the additional plugins.
Work around QTBUG-89754

Amends 7d948b0c5d

Fixes: QTCREATORBUG-26744
Change-Id: I5cafcbe77a37fcd9c5432ef45aa364066d772be8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-04 14:58:09 +00:00
Marco Bubke
00e3a3fa4b QmlDesigner: Add QmlDesignerProjectManager
Task-number: QDS-5886
Change-Id: I78605faa1871c9f27b26173d89e3daf68a07fd04
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 14:40:51 +00:00
Tor Arne Vestbø
86783985a0 macOS: Add tool for decoupling Qt Creator permissions from user applications
The TCC (Transparency, Consent, and Control) subsystem on macOS handles
access to private private data such as the Photos library, Calendar,
Reminders, or the ability to record the screen (among other things).

When an application is launched by launchd, for example by starting it
from Finder, it becomes the "responsible" process for permissions, and
any child processes launched by the application will both inherit the
application's permissions, and any permission requests from the sub-
processes will be requested on behalf of the application.

This is not ideal when Qt Creator is running user applications, as
we want these applications to properly request and manage their own
permissions, instead of inheriting and relying on the permissions
that Qt Creator may (or may not) have.

To fix this we use a small helper binary that explicitly disclaims
any responsibilities from the parent process, before exec'ing the
user application. We limit the usage of this helper to user apps,
as build tools and other helpers used by Qt Creator should still
be attributed to Qt Creator.

The functionality could have been implemented as a toggleable
feature in processlauncher, but since that helper uses QProcess,
which internally doesn't use posix_spawn on macOS, we would need
some heavy refactoring of QProcess or processlauncher to support
this feature. Keeping it contained in a standalone tool, that can
also be used for testing outside of Qt Creator, makes more sense
in light of this.

With the helper tool in place we can then remove a long list of
permission usage descriptions from Qt Creator's Info.plist that
were only there to allow user applications to not have to add
their own descriptions. Removing these makes it more predicable
for user applications that they need to manage their own
permissions.

It also stops Qt Creator from requesting permissions for Contacts,
Calendars, Photos, etc, at first startup, which looks weird if
you don't expect or want your IDE to manage your reminders or
photo libraries.

[ChangeLog][macOS] Applications launched from Qt Creator will no
longer inherit hardened runtime entitlements from Qt Creator, which
may result in the application needing to declare its own set of
entitlements if the hardened runtime is enabled.

Fixes: QTCREATORBUG-26743
Change-Id: I980d0ed98d875f0f3ec63a54f91f1d9fc7775062
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-04 14:04:46 +00:00
Marco Bubke
3fd3cc307e QmlDesigner: Don't export members which are not used outside
Change-Id: I2eb756484a13ce81fd55e7b991d3a509045974e8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-04 13:49:17 +00:00
Jarek Kobus
75df106c37 Remove unused method declaration
Amends 20d19aa5bf

Change-Id: I8231a331d1200a82f88b96fb703b9e2945efad1d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-04 13:12:08 +00:00
Orgad Shaneh
28334638ab Debugger: Fix MSVC warning
warning: C4305: '/=': truncation from 'int' to 'IntType'

with q[u]int8 template argument.

Change-Id: I0f0063191b0e51ab79f94073ead65da86ea82440
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 12:46:49 +00:00
David Schulz
14f40f3cdf RemoteLinux: fix qbs build
Change-Id: Id2ba2decfca5941e2b5c2503b78a089ca69d92e5
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 12:36:52 +00:00
Leena Miettinen
d55b50eabb Doc: Add filename extension to \inlineimage ok.png
...to remove a qdoc warning about the image not existing.

Change-Id: Id04dcb6cc76cbaaee6d8c9782add779d7f9dfbc9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-04 12:01:00 +00:00
Marco Bubke
b1760d15fe QmlDesigner: Add ExplicitImageCacheImageProvider
Task-number: QDS-5860
Change-Id: I755ddedebbfb9f7bcf0b6c93069f3e762706cb7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 12:00:18 +00:00
Marco Bubke
24087bd8b6 QmlDesigner: Add AsynchronousImageFactory
Task-number: QDS-5861
Change-Id: I3d938b3ddaa965da2105a326ea68f498dbb60fa0
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-01-04 12:00:11 +00:00
Marco Bubke
d479047275 QmlDesigner: Use optional for ImageCache*
There are now matcher in google test for optional.

Change-Id: Ib3389fb0f537fd19a2930e7108483736bbba1628
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 12:00:04 +00:00
Marco Bubke
3816250f27 QmlDesigner: Add AsynchronousExplicitImageCache
Task-number: QDS-5859
Change-Id: I962be68f22ba0c0118c14149a0d0ecf395934db5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 11:59:59 +00:00
hjk
20d19aa5bf RemoteLinux: Implement some of the remote file API
Implementation of remote file API for correct FilePath
work with RemoteLinux.
Added tests for this functionality

Run ssh shell in separate thread.
The linux device instance keeps its own thread for running
SshRemoteProcess. In this way all calls to filepath
interface of linux device coming from different threads
are executed in one thread (SshRemoteProcess is reentrant,
but not thread safe). The redirection to the device thread
is done by invoking SshRemoteProcess' methods through
BlockingQueuedConnection.

Done-by: Artem Sokolovskii
Change-Id: Id8756738d3a4597f175c8ef000c148d0c8536eeb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-04 11:16:14 +00:00
Leena Miettinen
05d7343018 Doc: Copy icons from sources to images\icons
Copy black icons with white background to be able to
turn them gray with transparent background as a first
step of making them visible in both light and dark online
doc modes.

Task-number: QDS-5693
Change-Id: I317714ba355d7c05742434fcdcafa87aef732dd4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-04 11:07:44 +00:00
Eike Ziller
5a135ba442 Modeling: Fix queued connections for Qt 6
The argument must be registered as a meta type for queued connections.
This also depends on a consistent naming of the type in the signal
arguments (which best is fully qualified).

Fixes: QTCREATORBUG-26760
Task-number: QTCREATORBUG-24098
Change-Id: I83991326f051d592a1665ae8cdb472d8376e74bc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 11:03:08 +00:00
Leena Miettinen
8d06519211 Doc: Describe new and modified Debugger keyboard shortcuts
F9 (F8 on macOS) is now Set or Remove Breakpoint and
Ctrl+9 (Ctrl+8) was added for Enable or Disable Breakpoint.

Task-number: QTCREATORBUG-26788
Change-Id: I54ddf2f15812dd5349ac31c8afade84c0e3fff96
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 09:47:24 +00:00
Orgad Shaneh
be9922c357 QmlJS: Add a missing include
Amends 125d7c0cce.

Change-Id: Ibfd6bb7da52547f743534105bf759387b674c2c1
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 07:00:14 +00:00
hjk
f2dea561ba Debugger: Introduce a Ctrl-F9 shortcut to enable/disable breakpoints
Since "toggle" now becomes ambiguous, change "Toggle Breakpoint"
to "Set or Remove Breakpoint" and add a new "Enable or Disable
Breakpoint"

Fixes: QTCREATORBUG-26788
Change-Id: I7902308298570360af202fced90bf44fc1a59adb
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-04 06:14:16 +00:00
Petar Perisin
32ed2df2f9 Autotools: setup configure command if it did not exist
since 'configure' file does not exist before 'autoreconf' is
executed first time, it is possible that initially 'configure'
does not exist. Therefore command need to be recalculated again
when step is about to be executed

Change-Id: I7eeeaefd6d41adb2bcb247e35a3de5862899c8db
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 15:41:30 +00:00
Eike Ziller
7d92375b2f Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/clangcodemodel/clangdclient.cpp

Change-Id: I75c954d2e573d65089205d2542747bba3276be2a
2022-01-03 14:14:12 +01:00
hjk
ea13ade822 Debugger: Add QStringView dumper
Fixes: QTCREATORBUG-20918
Change-Id: Ib16ac37000d227e6af2bc6d6640136ba0a7333b1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 13:07:56 +00:00
hjk
bf00252a34 Ssh: Simplify SshRemoteProcess interface a bit
Change-Id: I6871b16c05172d6b705f666c7962dd82320c6e8f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:48:23 +00:00
hjk
a68f2b48ac Ssh: Drop unneeded #include in sshprocess.cpp
Change-Id: Ibea173e81dc515e55d2a15be3c794016b6a49b99
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-03 12:45:57 +00:00
hjk
e8ae475fcf Debugger: Add a "Char Code Integer"
Fixes: QTCREATORBUG-22849
Change-Id: Id601eb5cbe1211cff595f04b5910a21f1ba33128
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:45:39 +00:00
Jarek Kobus
035ba1c10e Use ranged for loop in DeviceManager
Change-Id: Ic3017de13be1cdff63d800bfe94af46055d93b54
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:45:37 +00:00
hjk
42abef3434 Utils: Make FileSystemModel more flexible wrt to case sensitivity
We need to handle more than a host file system.

Change-Id: Ia5940f35437f9953df007616bb998698740db9ad
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-03 12:45:20 +00:00
Jarek Kobus
34ada7c1ff SshConnection: Remove unneeded includes
Change-Id: I03bc01ca1f9143bc0aa1574957bc30112d07a8dd
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:34:33 +00:00
Jarek Kobus
ee2960989e Remove unused SshConnection::dataAvailable() signal
Change-Id: I1e12965931a7623ed03d0e703b275eb02ddaf6c7
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-03 12:34:24 +00:00
Jarek Kobus
04362afed2 Make connParams a const member
Change-Id: I1dc75414766b9ec6c16a1c7080878da51310863c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-03 12:34:03 +00:00