Commit Graph

65 Commits

Author SHA1 Message Date
hjk
62b1795fb0 RemoteLinux: Further disantangle buildsteps from downstream
Expose Factories, (mid term:) hide step implementations.

Change-Id: I930899fe6873c8f727f3dedbb86aceb9bcbda0a4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-28 09:49:52 +00:00
hjk
64e40631ec RemoteLinux: Inline a few more deploy step functions
Change-Id: Ib93562b24de796f570cfa76dd3990ede5ebc6061
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 10:55:02 +00:00
hjk
c6b6e5b0c6 RemoteLinux: Drop some in-class signalling
Not needed since the deploy step and service hierarchy merge.

Change-Id: I644bdeca31caa2182b9d618e5f1ec6865c95f4c8
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 07:22:50 +00:00
hjk
a4ed630c7d RemoteLinux/Boot2Qt: Merge DeployStep and DeployService hierarchies
They were 1:1 now.

The change here is as small as possible, there are quite a few places
to clean up left.

Change-Id: I4f78d1de857b93d8372e2592a7723b02fe2fc947
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-23 07:16:54 +00:00
hjk
930cbdf68b RemoteLinux: Merge abstractremotelinuxdeploy{step,service} file pairs
Plan is to merge the class hierarchies, this is a mechanical first step.

Change-Id: I163578297a4badb5b8c861283f0d6a44c25f124f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-27 12:30:20 +00:00
hjk
15f33422cb RemoteLinux: Be a bit more verbose when rsync fails
Change-Id: Ibd049c67b5e6ab3d6526a35762f842819ef2f668
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-25 07:04:44 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.

For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.

Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-10 12:08:53 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
f2f1b7c2d7 AbstractRemoteLinuxDeployService: Refactor API
Instead of implementing two virtual methods:
- doDeploy
- stopDeployment
provide just one to be implemented:
- deployRecipe

The new method returns task tree description enclosed in
Group recipe. The abstract deploy service constructs the
TaskTree when needed, applies the recipe and starts the tree.

Change-Id: I36e52935f98736dafeea6be32fde5595410db077
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-25 13:33:47 +00:00
Jarek Kobus
0a925009a1 RemoteLinux: Fix const correctness
Amends c88a829059
Amends f9b4bcd3d8

Change-Id: Ia9817d4f7ba7df495e55e8729ba34258c907a545
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-25 09:28:41 +00:00
Jarek Kobus
c88a829059 RsyncDeployService: Reuse TaskTree
Change-Id: I411726e47550da5fd3269fcbb3e4f3e19096adeb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 15:12:14 +00:00
Jarek Kobus
d2b887cfad RsyncDeployService: Remove setFinished()
Use stopDeployment() instead. Simplify file transfer's
done handler.

Change-Id: Ib43d95c1498be590d1557fbe4fcaf2f2e79d08fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 10:50:35 +00:00
hjk
bf57568880 RemoteLinux: Fix RsyncDeployService::setDeployableFiles()
It previously did not set, but appended.

Amends 515845b815.

Change-Id: Ida3bd66e188ad4b1bbf0ea7686ac101a3f61c28e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-17 10:28:31 +00:00
hjk
9e4eabb410 RemoteLinux: Dissolve AbstractRemoteLinuxDeployStep::createDeployService
The previous setup doesn't buy much in comparison to new + setDeployService()
combo. Making that explicit now opens the path to simplify the two-phase
creation (i.e. move setInternalInitializer to the service c'tor).

Change-Id: Ib66c7d02efcddd6909fe612a786034e2728cdedf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-10-14 09:12:40 +00:00
hjk
541ddd1ff7 RemoteLinux: Be explicit about the current rsync support
We currently only transfer host->remote device (or back),
not host->host or remote->remote. Inform the user if we
hit an (currently) unsupported combination.

Change-Id: Icd33414d7d0bc2b5db284a62b5d757989f1596c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-13 14:01:08 +00:00
Ari Parkkila
d22fba5d7f Enable deploy step via rsync for Boot2Qt target
Fixes: QTCREATORBUG-24731
Change-Id: I1a4aaa9f653d42e89488b1790d9ddd10d3fb49dc
Reviewed-by: hjk <hjk@qt.io>
2022-10-13 06:04:38 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
hjk
ea1b35584d RemoteLinux: Streamline RsyncDeployStep interface
Change-Id: I5b5945758d4d188887e8724c09272f0fd9867c60
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-09-02 08:50:26 +00:00
hjk
e9d6c0f154 RemoteLinux: Streamline RsyncDeployStep interface
Change-Id: I5aa5ff477d1c654fd502575c32af667e436a2129
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-31 16:41:06 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
23d9ef1adb RemoteLinux: Convert to Tr::tr
Change-Id: I1c541d392992fb37acecbb98f331e01d7b73fbc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-22 11:11:48 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
hjk
eb411dfeb0 RemoteLinux: Fix rscync deploystep with multiple dirs
This was quoting them into a single argument, failing if there was more
than one.

Change-Id: Idc099970f3b747918adf7559b95e749940aad11a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-17 12:16:09 +00:00
Jarek Kobus
a7fa8c46ee LinuxProcessInterface: Fix error reporting on failed to start
Change-Id: I2af4a13289458e6270452a254cf90f7bd9cc3684
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-31 08:12:48 +00:00
Jarek Kobus
7d848364ff Move FileTransfer into ProjectExplorer plugin
Make it ready for providing implementations for other devices.

Change-Id: I14eaf167a7b2c1189f4d23f2e9f556204295b9b3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-30 10:10:33 +00:00
Jarek Kobus
87f3e7563c Ssh: Rename SshConnectionParameters into SshParameters
Move it to its own header.
Get rid of SshConnection and SshConnectionManager,
as they are not used anymore.

Change-Id: I52fe20d7816ea57e7a7158ab2ae9565d50a76e21
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-23 12:03:39 +00:00
Jarek Kobus
29a62ff35c RsyncDeployStep: Get rid of unused methods
Change-Id: If597b7cca7a5913c2c9bab663ddd4fcd098deb59
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-23 11:54:36 +00:00
Jarek Kobus
dcc93253c8 FileTransfer: Add some static helpers
Change-Id: Ie22e7ecce52b308df32316ff85d4744bd26060b0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 12:55:20 +00:00
Jarek Kobus
515845b815 RsyncDeployStep: Use FileTransfer for rsync
Instead of constructing custom ssh command.
Create the mkdir process on stack.

Change-Id: I3944ec4e2979b820a40971a8836e36084a44902a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-17 10:19:29 +00:00
Jarek Kobus
7cca6cd718 FileTransfer: Make the usage more convenient
Prepare the API for rsync implementation.

Change-Id: I13b7def31c2e2b1460d18340f6bd7cbd8e0e9434
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-16 17:27:29 +00:00
hjk
1ffaf0139a ProjectExplorer: Introduce a IDevice::filePath
Same function as mapToGlobalPath, but operating on a QString specifying
the local path part. It's the majority use case and arguably the 'right
thing' to use instead of a full FilePath that can refer to arbitrary
devices.

Change-Id: Ifc8bd340e2e8859fe549f5724eb94269f587c418
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-10 15:20:06 +00:00
Jarek Kobus
d8ee25ec3d Move setupSshEnvironment() into SshConnectionParameters
As we are going to remove SshRemoteProcess.

Change-Id: I07cf246791f1adb6cfc454935d7e330c2f1d4dc7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:02 +00:00
Jarek Kobus
a1b9619b5e RsyncDeployService: Don't use SshRemoteProcess
Use QtcProcess with a path on device instead.

Change-Id: I0b5f3160926287112b7fe53dea19d54ca5c07232
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 11:37:57 +00:00
Jarek Kobus
e9f1ff9193 RsyncDeployService: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: If18ff8431efa7f3b45212fe737f66fb4eb6c6fb5
Reviewed-by: hjk <hjk@qt.io>
2022-04-06 13:54:54 +00:00
Jarek Kobus
ab11c4373b QtcProcess: Introduce done() signal
Introduce QtcProcess::done() signal. It's similar to
QtcProcess::finished() signal, but also emitted when
process failed to start (so after QProcess::FailedToStart
error occurred).

SshRemoteProcess::finished() signal was already behaving
like this. So, we remove special handling of
FailedToStart error in this class and connect all clients
of SshRemoteProcess to done() signal, instead of finished().

Task-number: QTCREATORBUG-27232
Change-Id: If4240e2172f3f706e812bca669a1d5b24bdc3285
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 13:28:12 +00:00
Jarek Kobus
0dfcc97a3e SshRemoteProcess: Rename done() -> finished()
Change-Id: I9c22d075f50b0a2a171cbda11c7579e4735f3f4e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-28 16:12:27 +00:00
Jarek Kobus
7b5dfcd6cd SshRemoteProcess: Get rid of error arg from done() signal
Prepare for signal rename done() -> finished().

Change-Id: I81a7bd0a4826ce6200f4af47ba5868ceedb42206
Reviewed-by: hjk <hjk@qt.io>
2022-02-28 14:21:47 +00:00
Jarek Kobus
098e3794db Get rid of SshProcess (one process class less)
Introduce static SshRemoteProcess::setupSshEnvironment()
method instead.

Change-Id: I9a49bc68bd96ddf0f58234d28b92a721f7d4bb56
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-21 16:17:31 +00:00
Jarek Kobus
e2f7a2a898 Provide a default implementation for doDeviceSetup / stopDeviceSetup
Change-Id: I9f4e15f98039315ddcdd4f40fb6d0802b94da87a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2022-01-10 14:35:11 +00:00
Jarek Kobus
f72c4cb8ac Ssh: Re-base SshProcess on top of QtcProcess
Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 09:26:09 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
Christian Kandeler
ffb19f9acf RemoteLinux: Proper support for rsync on Windows
The Windows implementations of rsync have some peculiarities.

Fixes: QTCREATORBUG-25333
Change-Id: Ic69c7ffb868d25e391501a3e3c1b8d007abca8ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-04 05:29:15 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Eike Ziller
344802b8b2 Don't call erase without namespace qualification
C++20 adds free a function `erase` as API for containers, and Qt 6.1
adds it for Qt containers.
Since it is a free function, ADL kicks in and creates issues if
we don't fully qualify calls to our `erase` function.

Change-Id: Ie5971d9206ae9e87e0f28f1390c09ded6f431b90
Reviewed-by: hjk <hjk@qt.io>
2020-12-09 13:15:22 +00:00
hjk
591e93316d Consolidate build/deploystep default display name handling
Use the display name from the factory as default, override if needed.

Change-Id: I03519c998432fea4120b0de8b2fc2686644635f2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-10-02 13:18:45 +00:00
hjk
9f378d41e4 RemoteLinux: Make build/deploysteps constructible by id only
Will help to remove some of the remaining hard dependencies of Qnx and
Boot2Qt on RemoteLinux.

Change-Id: I1a327249a9b2903b5b9d869cb9cd60bb50250a5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-16 15:32:44 +00:00
hjk
51e7bce109 ProjectExplorer: Rename Base*Aspect to *Aspect
In most cases they are used directly, so there's not much Base* in that.

Added the old name as alias as porting help for a while.

Change-Id: I494a8a560b8996bcf74915ea3570b504df6a6b4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-08-14 07:35:43 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
hjk
c95bde6f6a ProjectExplorer: Pass Id to BuildStep constructor
Allows to use constants in fewer places, similar to what e.g.
RunConfiguration does.

Change-Id: I9d049128206c4acf0ce14b06b66d6c090a7c5242
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 11:26:01 +00:00
Orgad Shaneh
49f6b0146a Merge remote-tracking branch 'origin/4.11'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportrunconfiguration.cpp
	src/plugins/python/pythonproject.cpp
	src/plugins/qmakeprojectmanager/qmakestep.cpp
	src/plugins/qmlprojectmanager/qmlproject.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
2019-12-07 18:39:54 +02:00