Commit Graph

30 Commits

Author SHA1 Message Date
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
Christian Kandeler
fd39ea9ef9 RemoteLinux: Fix deployment of directories via rsync
If the source path is a directory, we need to append a slash to tell
rsync that it should not interpret the target file path as the parent
directory.

Fixes: QTCREATORBUG-23235
Change-Id: I8bf0737ecf710e6a1c341cf6559b34f6b1d64e38
Reviewed-by: hjk <hjk@qt.io>
2019-12-03 09:14:56 +00:00
Christian Kandeler
221d356210 Qmake: Make proper use of BuildDirectoryAspect
Change-Id: I439496c85f7e0f402ab038de6a8171dd2f7d2ffd
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 12:30:52 +00:00
Christian Kandeler
030fd96d18 SSH: Ignore connection timeout with Microsoft's OpenSSH
The Microsoft-provided ssh binaries misinterpret the connection timeout
in that they only start to connect after that period has passed, which
slows down the connection process. So let's not use the timeout option
there.

Change-Id: I5a5335c7f1b4af04f1afb5603ab0f1a518e8c95e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-01 14:10:36 +00:00
hjk
77e8e1707c RemoteLinux: Move deployservice ownership to AbstractRemoteLinuxDeployStep
Change-Id: I12cfa0d2cdb171d381e6fde6b0e71fc0c098d746
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-14 13:00:25 +00:00
hjk
d747be71f5 RemoteLinux et al: Use functor for deploy step polishing
More compact.

Change-Id: I8adc63aec71de1e57640911300f2699598ef1a01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-11 13:56:55 +00:00
Christian Kandeler
b70d39a091 RemoteLinux: Let user specify the rsync flags
Task-number: QTCREATORBUG-22352
Change-Id: I11c16b5f7c58093bb89a9493a8742f338dbdd9c1
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 16:37:44 +00:00
Christian Kandeler
0a555018d1 SSH: Pass remote command as QString
The old implementation sent the command over the wire as-is, so we
declared it as a QByteArray and let the caller choose the encoding. This
doesn't make sense anymore, as the command is now passed to an external
process as a QString anyway.

Change-Id: Ib84bc0f871db2b45b93f71d924c4177cc28d3bb0
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 09:08:49 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
hjk
09df30396f RemoteLinux: Use a structure to return check results
Instead of the combined bool value + QString * out parameter.

Change-Id: I8840f48b74aaacd1b0c0412efd8abcdc2be12d58
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-25 08:09:22 +00:00
Christian Kandeler
261d7752b0 RemoteLinux: Retrieve deployment info from local install root
This provides correct deployment information as seen by the build system
when Qt Creator cannot retrieve it directly.
It's most useful for autotools and cmake projects, but can also help
with qmake in certain edge cases.

[ChangeLog] It is no longer necessary to provide a
QtCreatorDeployment.txt file when using CMake projects with remote Linux
devices.

Fixes: QTCREATORBUG-21855
Change-Id: I27e07a45dd1565e489f4b573cc3fff8191c57d9b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-04-23 15:52:05 +00:00
Christian Kandeler
7e0c17eb37 RemoteLinux: Do not use rsync's -z option
There are several ways of specifying compression, none of which are
guaranteed to work in all versions of rsync.
We will make this configurable in 4.10.

Fixes: QTCREATORBUG-22352
Change-Id: I0dbf9531cb84e15559728ac9bd3e90a9d65382e4
Reviewed-by: hjk <hjk@qt.io>
2019-04-23 15:24:44 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
hjk
9a4d6b4baa RemoteLinux: Add guards to some RsyncDeployStep connections
Change-Id: Icfe8d21f1910eb140821fef0055390b985878651
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-01 14:56:35 +00:00
Christian Kandeler
a0a97c2edc RemoteLinux: Use an SshProcess for rsync
Otherwise, if connection sharing is disabled and public key
authentication fails, the askpass tool is not invoked.

Change-Id: Iea8316675b8f270c924f822f340f6282b21450d5
Reviewed-by: hjk <hjk@qt.io>
2018-12-21 08:05:48 +00:00
Christian Kandeler
1dfa7279d4 RemoteLinux: Add an rsync deploy step
Using rsync enables proper incremental deployment and is particularly
helpful when larger files are involved.
We check whether rsync works as part of the device test. If it does, it
becomes the default deploy step, otherwise we fall back to SFTP.

Change-Id: I6ab938ccd5acd7e0cbe07b90b6938dccad19bba5
Reviewed-by: hjk <hjk@qt.io>
2018-12-17 13:42:25 +00:00