Commit Graph

62421 Commits

Author SHA1 Message Date
Marco Bubke
b2e1bcc4e5 QmlDesigner: Add fetchHasImage to ImageCacheStorage
Change-Id: Ieb148abb02527bb84eda4f00af85a66d98731f03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 14:36:19 +00:00
Marco Bubke
6d7578a75b QmlDesigner: Improve target support
In the long run we have to use a value class of the target pointer which
will be simply copied to the thread and cannot get dangling.

Change-Id: Ib99a69aa9697038887a24300eb234c3baf4eb1b2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-06 14:36:15 +00:00
Eike Ziller
bcee5c5dc4 ClangCodeModel: Fix performance regression of code completion
Broke when converting the code to QtcProcess.

Amends 8724a4efbb

Fixes: QTCREATORBUG-26829
Change-Id: I14b4bd9ddc035c1c837231cb6436d9e8e203d5cd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 14:34:55 +00:00
Eike Ziller
1df8dd3c93 Revert "Revert "Use QtcProcess for clangbackend""
This reverts commit d65e47b5c6.
Reverts the quickfix for the performance regression of code completion.
Followed by a minimal fix.

Task-number: QTCREATORBUG-26829
Change-Id: I1afe71c24ee94caadd4fa849c29f6fc030fb1a8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 14:34:35 +00:00
Cristian Adam
1b8e59729b QmlDesigner: Build fix for MinGW 8.1.0
The headers were not actually used, and by removing them the
MinGW 8.1.0 build is back to green.

Change-Id: I38572696a3c1abc15ec79c1cfd0f7c68ba1fc6b0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 14:12:18 +00:00
The Qt Project
0866b26308 Merge "Merge remote-tracking branch 'origin/6.0'" 2022-01-06 12:14:28 +00:00
Eike Ziller
65e8c864af Merge remote-tracking branch 'origin/6.0'
Change-Id: I405e3f95b0cdcd7b2686f31baae16c03c787f007
2022-01-06 11:55:39 +01:00
David Schulz
bab969aa73 RemoteLinux: Fix qbs build without tests
Change-Id: I9a30d434822526a5555c70ffa362a8104e81b230
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 10:32:17 +00:00
Thomas Hartmann
06137eb789 StudioWelcome: Read mainFile from .qmlproject file
Change-Id: I0fd413cb8334fc3a60b313cee425966745f8a9fe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-06 09:43:13 +00:00
Henning Gruendl
117a8c65b9 QmlDesigner: Replace filewatcher in resource model
Replace the Utils::FileWatcher with a connection to the ProjectExplorer
fileListChanged signal.

Change-Id: Ia2d3a6d239451ed979bbfb654fe5258aadd3c686
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 08:48:07 +00:00
Henning Gruendl
4617023e16 QmlDesigner: Left align connection view headers
* Left align the headers of connection, binding, dynamic properties and
  backend view.
* Add left padding to give some space between text and separators.

Task-number: QDS-5851
Change-Id: I8f5981e6636fa2f3d6a0c4b9d9abd4e9f54603ed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 08:47:37 +00:00
Eike Ziller
a2303f9c4c ModelEditor: Fix build with Qt 5
Add missing Q_DECLARE_METATYPEs
Amends 5a135ba442

Change-Id: I12297243f0ed28405bd9f225d7c1dbf5a3511f0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-01-06 07:51:17 +00:00
Eike Ziller
2f71b49399 CMake build: Fix build without tests
Like for our binary packages

Change-Id: I942b5d840e1a03a535c9f1a1c65fb1f2b3e72cea
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
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-01-06 07:34:20 +00:00
Marco Bubke
3babbe2def QmlDesigner: Fix image creation
We now do it on document change to work around puppet and codemodel
problems.

Change-Id: Ifd1f6835cc5c0abd3430d5d26685e838dc561ae2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-05 19:25:32 +00:00
Thomas Hartmann
b7a6bb8d9d QmlDesigner: Define default thumbnail
Change-Id: I19b5d515eeb404d4c337a08716acc06e9d831468
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-05 17:11:35 +00:00
Marco Bubke
5eeb42ec5f QmlDesigner: Add new files to qmake .pro for 6.0
Change-Id: I37c2319e2feba1c2bda7689b49e2ab23457d18e1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-05 17:11:00 +00:00
Samuel Ghinet
73114f3583 Add unit tests for QDS New Project dialog
Added tests for WizardFactories class and for StyleModel class.

Task-number: QDS-5690
Change-Id: I08f51c2b6cf628a265286ddb8056bd049a64ff0b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-05 16:25:42 +00:00
Petar Perisin
7ae50c9224 Fix qmake build
Change-Id: I005b1641bb62ab961cb4f0ad0d1b9947262354e2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-01-05 15:56:14 +00:00
Thomas Hartmann
221a89694a StudioWelcome: Integrate preview thumbnail image provider
Task-number: QDS-5866
Change-Id: I159565bbd9f30b6a73f923367de9292cfc0b69d2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-01-05 15:32:34 +00:00
Cristian Adam
2d9dde30dc CMakePM: Remove "Clear selection" button in Settings
The "Clear selection" button doesn't add much value in the list
of buttons.

If you have a selection it doesn't really matter, and you can
simply click on an item an the new item will be the new
selection.

Change-Id: Ie64bc379773219392c12da4c256afd462d4081a9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 15:05:26 +00:00
Thomas Hartmann
1d2636dd08 QmlDesigner: Add support for .ktx
Task-number: QDS-5849
Change-Id: Ibe0bb3f2480a25a2d80793526d6581e89c22529f
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-01-05 15:04:17 +00:00
Thomas Hartmann
d88b32722e QmlDesigner: Do not use small image for thumbnail
Change-Id: I03231f6c61f0f0bcd7dcb24d7de002a950eb82d2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-05 14:55:57 +00:00
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
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
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
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
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
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