Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
4e69aece65 RemoteLinux: Hack in a way do make the MakeInstallStep work with docker
A proper solution would be a proper step handling the copy from
the build container to the device. Instead, rely on the (unchecked)
mounting of build directory from the host file system.

Task-number: QTCREATORBUG-27325
Change-Id: I1a364460c08f205dbc341fa0dc941cf1e3c950ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-14 12:48:27 +00:00
Christian Stenger
6c4d5ef3c7 Modeling: Fix crash while reset model
Fixes: QTCREATORBUG-27226
Change-Id: I1333379a99ff5ebd08b121f2f014c6971a192699
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 12:47:59 +00:00
Christian Stenger
a370c154d0 QmlProjectManager: Fix crash when building with Qt5
Change-Id: Id5af5b6dfe4613f2a0669febee4622944854a999
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-14 10:35:38 +00:00
Jarek Kobus
0b2899215f Introduce ProcessBlockingInterface
This replaces the ProcessInterface::waitFor...() methods.
It's not obligatory to provide this interface when
implementing ProcessInterface subclass. In this case
generic blocking implementation will be used.

The generic implementation usually isn't as efficient as
the custom one, however, for some sophisticated implementations
of process interface, like e.g. SshProcessInterface, providing
custom implementation is really difficult and error prone.

That's why we try to keep a balance: we provide two custom
implementations for QProcessImpl and for ProcessLauncherImpl,
as they are relatively easy to implement, and rely on
generic implementation for others.

Change-Id: Ifc8bd354479ec67b2e8f74f1510f8de8883e9b94
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-14 09:45:28 +00:00
Jarek Kobus
0efb8d3346 GenericLinuxDeviceTester: Don't continue testing when echo fails
Change-Id: I4b21e1b914816271d59f9001122aedf1eda342dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:19:02 +00:00
Jarek Kobus
12dde16e3e DeviceSettingsWidget: Fix testing newly added device
Save settings before starting a test, otherwise the
test for newly created device fails since the new
device was added only for the clone of device manager.

Change-Id: Ia36d2ef68740907d7fce51e31c352328de83421c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:18:29 +00:00
Jarek Kobus
17ebce2a7d Fix public key deployment in device wizard
Since there is no easy way to make device temporary added
into cloned device manager, we construct a full ssh command
manually inside PublicKeyDeploymentDialog.

Fixes: QTCREATORBUG-27706
Change-Id: I28e368a5bff0d89094115e9eaee1395b388359fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 09:03:58 +00:00
Christian Kandeler
1bc188222a ProjectExplorer: Fix crash in toolchain widget
Amends d73d5fe0b1

Fixes: QTCREATORBUG-27696
Change-Id: Id94f39cd4fc6768af3f66039f808ed7c974cfeed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-14 07:51:42 +00:00
Christian Kandeler
75502f2998 CppEditor: Fix check for static-ness
... in generate getter/setter quickfixes.

Fixes: QTCREATORBUG-27547
Change-Id: I29e937ae28c0bce7cd7745b92f371b97876f3e01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 14:10:25 +00:00
David Schulz
9c13db448b CppEditor: remove unused function hint provider
Since we removed the libclang based backend both implementations of
ModelManagerSupport::functionHintAssistProvider returned a nullptr.

Change-Id: I113c5a08cf604eb1bb2a64a851f022ecd5c908d6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-13 12:11:24 +00:00
Miikka Heikkinen
b307182e76 QmlDesigner: Fix occasional creator side crash related to puppet reset
Change-Id: Iee032937b89b8ffcaa012c21b7cac029e1b286cf
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-13 12:10:55 +00:00
Jarek Kobus
a1bb539c50 LiteHtmlHelpViewer: Handle mouse back/forward buttons
Fixes: QTCREATORBUG-25168
Change-Id: I856743040e81a0164e666f14ea7efd10f208f865
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-13 11:09:56 +00:00
hjk
f974488128 ProjectExplorer: Move makeInstallCommand()
... from Project to BuildSystem.

More direct and less use of Target::activeBuildConfiguration().

Change-Id: I148381d23be0f9ab0750ed1440e1b2b3e25aded0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-13 10:22:40 +00:00
Christian Kandeler
9a411245d3 qbs build: Require Qt 6.2 for QmlDesigner
As in the cmake build.

Change-Id: Iedd7032093682e7cf6f423909724201f6c5840d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 10:09:09 +00:00
Eike Ziller
a760d5ad81 CMake: Make QML debugging state reflect build system state
After parsing the CMake response, we make the configuration variables
table reflect the actual configuration in the build directory. It is one
of our "promises" that we do not break an existing build configuration,
to avoid unexpected rebuilds.

This was not quite true for the "QML debugging and profiling" setting.
When that setting and the actual build directory disagreed, the user
would get a dialog asking for running CMake with additional parameters,
and when running CMake via the button in projects mode or the menu, it
would just change these configuration parameters, potentially leading to
an unexpected complete rebuild of the application.

So, after parsing check if the actual CMake configuration matches our
QML debugging setting, and if not, change the setting to "Leave at
Default", to ensure that we don't mess with the build.

Fix the "Run CMake" button state (in the "Current Configuration") when
changing the QML debugging option, which should become bold, if the
CMake parameters change.

Amends 2577ce8ba1 and fixes the drawback
mentioned there, i.e. setting the build directory of a "Debug" build
configuration to an existing build directory with QML debugging
disabled, will now simply set the QML debugging option to "Leave at
Default" instead of forcing it to "Enabled".

Change-Id: Ie6d4875d59319687d94e44e459ca76038e5813c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-13 10:03:38 +00:00
Eike Ziller
948f0070fa macOS: Fix importing command line builds with CMake
When configuring a CMake project on the command line, CMake will
(correctly) find and use the compiler from the current developer
directory, usually somewhere in
/Applications/Xcode.app/Contents/Developer

But Qt Creator auto-detects and sets up the compiler /usr/bin/clang(++)
for desktop kits. This leads to a compiler mismatch between kits and the
imported build, and to new kits registered in Qt Creator for the import.

Since /usr/bin/clang(++) is just a thin wrapper that resolves to the
compiler in the current developer directory, resolve that in Qt Creator
with "xcrun -f <command>" too (caching the result), and include that
when comparing toolchains for importing builds.

Fixes: QTCREATORBUG-27591
Change-Id: I301e2a4e267450b488b49d0c32d4ce89001bb5ec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-06-13 10:03:16 +00:00
David Schulz
4612a052f4 TextEditor: fix typo
Change-Id: Ibad6729f5281a1b7036af7483a82eae7e22649a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 08:26:38 +00:00
Christian Kandeler
e128c8cbde CppEditor: Fix looking up containing function for search result
- Move look-up to CplusPlus::FindUsages, where we are guaranteed that
  we actually have the document source.
- Use the same straightforward algorithm as with clangd.
- Undo the changes to CppDocument::functionAt(), which broke
  the autotest.
Amends 6f7e7980d2.

Change-Id: I008d05ba41a3b63b71e3131d7021e0d4e7d0641f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-13 06:54:58 +00:00
Eike Ziller
cf0fa99e85 Merge remote-tracking branch 'origin/8.0'
Change-Id: I2a2fdbfdaf5117de582e7e091e3913a55e225173
2022-06-13 08:36:31 +02:00
hjk
e2e5d67bc3 ProjectExplorer: Use FilePath in installRoot machinery
Helps to get path delimiters right.

Change-Id: Ifaab593a530c667488b7b5e6546041d8c212ece8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 14:03:09 +00:00
hjk
eb886ad40b ProjectExplorer: Use CommandLine in MakeInstallCommand
Instead a FilePath/QStringList pair.

Change-Id: I55340795266699e448ec1e17681a5e788eaae37a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 14:02:50 +00:00
Eike Ziller
fc636755af Fix crash of tst_ImportCheck
We don't have a PluginManager instance when running the autotests.

Change-Id: Ib36ea2bb58e500a2ad4b601cedfb8d426fda7e4e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-10 13:21:28 +00:00
Christian Stenger
d06d6ebeba GitLab: Fix reflecting port data inside ui
Set values did not show up inside the ui. Likely a redo of
the options page would be more appropriate, but for now the
quick fix should be good as well.

Change-Id: Id782ba48ea4dee08b2c6720cdf9e78350f1e9a47
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:57:44 +00:00
David Schulz
99acc9a153 Python: Fix python detection for non project files
Do not return an empty file path if we cannot find a python venv for a
file path, but also consider the configured interpreters.

Change-Id: I5a7f06e394fb925f9a00143fc5f0797e8754534b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:29 +00:00
David Schulz
4c20a880e6 Python: remove python specific language client settings
Change-Id: Ic993d525f29c1925f7e64dfc6f5e053234fb4904
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:23 +00:00
David Schulz
ed22ef7854 Python: globalize Python language server settings
Change-Id: I84fcee6462064f0c788492fcfa12a77379af2bd7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:40:43 +00:00
Christian Stenger
e42ff3f14e GitLab: Allow localhost for server
Change-Id: I026f6a72c9eb0b377319fca847062885c666ed4a
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:27:56 +00:00
Christian Stenger
0cfd264279 GitLab: Handle certificate issues
Allow to bypass certificate verifications.
Currently the bypassing is not stored into the settings,
so this is not permanent.

Change-Id: Ieb564464a28cf2d4973c6b1baa696d6c22b07177
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 12:27:45 +00:00
Christian Stenger
fdb413c9a7 GitLab: Support unsecure http as well
Change-Id: Idfb4faf1cbfbfd6c2914b057e6c76461de0ceeff
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:27:30 +00:00
hjk
6674e5f267 Docker: Remove DockerBuildStep
That was part of the initial Proof of Concept and is not needed anymore,
the normal build steps can nowadays be remote.

Change-Id: Ic69ff89ebdcf8e6aef73d71954a48501c68c60ff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:25:28 +00:00
Piotr Mućko
1c4abbf069 McuSupport: Auto manage memory of McuPackage's version detector
Use smart pointer for member of McuPackage.

Change-Id: I2474fc791b91c489be77aee3aab86401aaef76e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 11:19:49 +00:00
hjk
8b6aeb9d16 Utils: Use case folding instead of toUpper for hashing file paths
Change-Id: I680db342b6b0b2433951064bb236ef7efadabf3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-10 11:02:41 +00:00
Christian Stenger
6e57bedf69 QmlProjectManager: Fix compile
Amends 82911d2ec3.

Change-Id: I31bb8d88911837fca117ea76f8c474c555f9e59e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 10:06:38 +00:00
Eike Ziller
f1024bd5b1 EditorManager: Limit number of splits
To something large, but limit it. Having many editors open for the same
document can be a strain on slower machines.

Fixes: QTCREATORBUG-27568
Change-Id: I7074fc2c8eae1f4ccaa14a9a48b01afede454b0a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 09:33:55 +00:00
Miikka Heikkinen
36dbc62a1d QmlDesigner: Queue puppet processes during import
On some systems launcing multiple simultaneous import processes causes
imports to fail. Fixed by only launching single process at a time
and queuing the rest.

Fixes: QDS-7107
Change-Id: I330c5920dcbd74d3b4f2e7f40899795a4fbaf3ac
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-10 09:31:03 +00:00
Thomas Hartmann
d8c605179a QmlDesigner: Add option for smooth rendering in form editor
Smooth rendering turns on MSAA and doubles the resolution for
rendered items. With this option enabled everything stays smooth when
zooming in. Around factor 8-10 pixels become clearly visible again, but
it still looks relatively smooth.
I added both MSAA and increased the resolution to one option, for simplicity.
The smooth mode takes 4 times the shared memory, which should not
be an issue in most cases.
For now, the option is not the default.

Task-number: QDS-7129
Task-number: QDS-7128
Change-Id: I8a778650bb40f8ba796960db9bc966e8a1efff4e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-10 09:04:11 +00:00
Christian Kandeler
9ee60ecd87 ClangCodeModel: Derive displayed search term from adjusted cursor
Otherwise, we can have discrepancies between displayed and actual search
term.

Change-Id: Iadd2ec54db4cef4b103c3c0ef98eb47828ea544b
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-06-10 08:57:04 +00:00
Christian Kandeler
428a2c3c14 ClangCodeModel: Another cursor adjustment
Change-Id: Ie4859a52b12b3e87a65bd8c04e0123e6f34a9e73
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-10 08:56:44 +00:00
Christian Stenger
146c277837 AutoTest: Unify framework and tool naming
Use the same name for the test framework or tool across
Qt Creator.

Change-Id: I3116644ab03cc46c2e9d7e8aa3b8af8a5386dba4
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-10 08:47:12 +00:00
hjk
e3bb14d0d2 Docker/RemoteLinux Fix file size and permission retrieval
When a file path is a link, give the result of the dereferenced
link. This is what QFileInfo does locally.

Change-Id: I26ca1fb70d3391da77f2a5845e5f0a2c0fb73d53
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2022-06-10 08:18:06 +00:00
Tapani Mattila
82911d2ec3 QmlProjectManager: Add .qmlproject file generator
Task-number: QDS-6993
Change-Id: I033b0efeea87e8eab3238d3ce8d5f25752822e36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-10 08:06:59 +00:00
Eike Ziller
0f2adef192 Merge remote-tracking branch 'origin/8.0'
Change-Id: Ie0362c57fd7c21844452919e3d843a5321c103c3
2022-06-10 09:44:07 +02:00
Jarek Kobus
dec3fb7503 DeviceProcessesDialog: Fix a leak of DeviceProcessList
Fixes the following printout on Creator shutdown when
LinuxDeviceProcessList was used:

[launcher] "qtc.utils.launcher: \"Shutting down while process
/usr/bin/ssh is running\"\n"
SOFT ASSERT: "m_handles.isEmpty()" in file
/home/jarek/dev/creator-8/src/libs/utils/launchersocket.cpp, line 533
Destroying process launcher while 1 processes are still alive.
The following processes are still alive:
   "/usr/bin/ssh" QList("-M", "-N", "-o", "ControlPersist=no", "-o",
   "PermitLocalCommand=yes", "-o", "LocalCommand=echo", "-o",
   "StrictHostKeyChecking=no", "-o", "Port=22", "-o", "User=jarek",
   "-o", "IdentitiesOnly=yes", "-i", "/home/jarek/my_test_key/test_key",
   "-o", "BatchMode=yes", "-o", "ConnectTimeout=10", "-o",
   "ControlPath=/tmp/QtCreator-EACYSH/cs", "127.0.0.1") in thread 0x1d62b98

Change-Id: Ib64de5d4651b78fb313d7affa88f3f796953382e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-10 07:42:47 +00:00
Jarek Kobus
198aa551b2 MakeInstallStep: Fix error messages
Change-Id: Icc63b7765c421324ca6173f2d628653d361c3d85
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-09 15:28:01 +00:00
Jarek Kobus
97ec19a4f5 CheckForFreeDiskSpaceService: Fix error message
The message is shown e.g. when trying to run an app on remote
device when ssh service is not running.

Change-Id: I2db06cf8e999d55e7c822c14168185d07e0c3286
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-09 15:27:52 +00:00
Thomas Hartmann
ab635dd4b2 QmlDesigner: Do license check only once
We should only make the license check once.
An evaluationLicense is handled as enterprise license.

Change-Id: Ib4b53795a7d735c10b5238f1e7b76346a9bcc8e1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-06-09 14:27:29 +00:00
Christian Stenger
a63d27dc52 Utils: Fix qbs build with Qt6 on Win
Change-Id: Ib42b0e1a70399430bc84f62ca32c6c05efced176
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-09 12:53:36 +00:00
Alessandro Portale
79d08bd5dd Tracing/QmlProfiler: Fix deprecation warning with Qt 6.3+
From Qt 6.3 on, QSGMaterial::CustomCompileStep is deprecated and
QSGMaterial::NoBatching should be used, instead.

Change-Id: I27b2fd2e8b86de85ec88ab81b90e056005a4986d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-06-09 10:07:17 +00:00
Marcus Tillmanns
16c10cc913 DeviceShell: Don't use 'command' to test for base64
On (debian based) linux the "command -v base64" did fail to find
the base64 exectuable. Instead we now use "which".

Change-Id: I9b57527d93952b08bcb9abc7484a7e6891aa664c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-09 08:17:16 +00:00
Henning Gruendl
519f6fbda1 QmlDesigner: Add drag'n'drop to PropertyEditorView
* Implement drag and drop for UrlChooser and FontComboBox
* Change the style of controls accepting drag payload and drag hovering.
  Utilize states for those styles.
* Fix aspect ratio of drag pixmap
* Fix issue that causes drag to continue after pressing the escape key

Change-Id: I5cf67175abe936e60e8af00fa8c2f7a2dec355b3
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-08 17:30:10 +00:00