summaryrefslogtreecommitdiff
path: root/src/libs/ssh
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of Ssh libJarek Kobus2022-05-237-666/+0
| | | | | | | | Move the rest to ProjectExplorer plugin. Change-Id: Id2f022359e7e01728779228ea1f7f0b05a81c8e4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Move the question mark icon into utils.qrcJarek Kobus2022-05-234-7/+0
| | | | | | | Change-Id: I91eab75a89fdbf9852e92153d4edb42af8c42373 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Move SshKeyCreationDialog into RemoteLinux pluginJarek Kobus2022-05-235-453/+0
| | | | | | | It's being used only there. Change-Id: Ie2917f34268eba3ada4f152d3feeaa4130350236 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Ssh: Rename SshConnectionParameters into SshParametersJarek Kobus2022-05-239-845/+233
| | | | | | | | | | 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>
* Get rid of SftpTransferJarek Kobus2022-05-238-381/+0
| | | | | | | | Remove also sftpdefs.h. They are not used anymore. Change-Id: I6c45a70cec2e01afdd1a668068e090f5d4abde9b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* SftpTransfer: Get rid of FileTransferErrorHandling enumJarek Kobus2022-05-115-24/+10
| | | | | | | FileTransferErrorHandling::Ignore wasn't used anywhere. Change-Id: I5826fc9f7871b06cd8f423d7e3b1d01a5b6cbdff Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Introduce QtcProcess::controlEnvironment()hjk2022-05-101-2/+3
| | | | | | | | | | | | | | ... and drop QtcProcess::removeEnvironment() This shifts the meaning of the unqualified QtcProcess::environment() to always refer to (possibly remote) "main" process this QtcProcess wraps. The controlEnvironment is now referring to secondary helper processes (if any...) typically(?) running on the host system. This helps to avoid local/remote distinctions in some places. Change-Id: Ib7cd15dd226617484b5358acd7deaed29e751883 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* QtcProcess: Forward declare Environment in QtcProcess headerJarek Kobus2022-05-091-0/+1
| | | | | | Change-Id: If85a8a07b144c94cb6e45f66dcb06573ef07c777 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Get rid of SshRemoteProcessJarek Kobus2022-05-096-196/+0
| | | | | | | | It's being replaced by QtcProcess with path on device. Change-Id: I29eb038d1b17151683f86855eb547e47f7f7dea5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Move setupSshEnvironment() into SshConnectionParametersJarek Kobus2022-05-095-25/+30
| | | | | | | | 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>
* Get rid of SshRemoteProcessRunnerJarek Kobus2022-05-094-290/+0
| | | | | | | | It's being replaced by QtcProcess with path on device. Change-Id: I89abacd686e00e3f42f6ab90e9439f015d73ce80 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Get rid of SshConnectionInfoJarek Kobus2022-05-032-49/+0
| | | | | | | | It's not used anymore. Change-Id: Ie77c9d9bc8eb82c1f74cfdac2304bc6c2f92ee93 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* CMake: Qt Creator Static build supportCristian Adam2022-04-291-0/+2
| | | | | | | | | | | | | | | | | | | This adds the build system feature that allows Qt Creator's libraries and plugins to be compiled statically. Fixes some symbol clashes when all plugins are linked into the same executable. Support for actually loading static plugins will be added in a separate commit. The feature is controlled by QTC_STATIC_BUILD which by default is OFF. Change-Id: I1fab7953c43e42dc75619e35660029ee067106df Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ProcessInterface: Get rid of state() methodJarek Kobus2022-04-142-3/+3
| | | | | | | | | This is fully controlled by QtcProcess itself, so provide general implementation of state() inside QtcProcess. Task-number: QTCREATORBUG-27358 Change-Id: Id6f0b771ed933f870b80d6856c6d94896f946516 Reviewed-by: hjk <hjk@qt.io>
* Introduce ProcessResultDataJarek Kobus2022-04-112-4/+6
| | | | | | | | | It should be useful when reimplementing ProcessInterface. It replaces 4 virtual methods with just 1. Task-number: QTCREATORBUG-27358 Change-Id: I2dafbfbc25f8f016ff2aa19c1a176335a4a7498c Reviewed-by: hjk <hjk@qt.io>
* Get rid of SftpSessionJarek Kobus2022-04-087-423/+0
| | | | | | | | | Should be substituted by FilePath actions using remote paths. Change-Id: Ib1e3913cc94d417045cbe6b922284a2f8ab6d71f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Get rid of SftpFileSystemModelJarek Kobus2022-04-084-487/+0
| | | | | | | | | It's being replaced with DeviceFileSystemModel. Change-Id: I062f2a873ecede9755527e8ee7b8b4d578289c4b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* QtcSsh: Connect to QtcProcess::done() signalJarek Kobus2022-04-053-32/+18
| | | | | | | Instead of connecting to errorOccurred() and finished() signals. Change-Id: I113f51564501a67725afee77ab4d20e5d954a7c0 Reviewed-by: hjk <hjk@qt.io>
* Don't delete process directly from process' finished handlerJarek Kobus2022-04-051-1/+1
| | | | | | | | | | | | | | | | | AbstractProcessStep::slotProcessFinished() slot is connected to m_process finished() signal. We call there AbstractProcessStep::Private::cleanUp(), and that calls m_process.reset(), so it invokes m_process d'tor directly. SshRemoteProcessRunner::handleProcessFinished() slot is connected to d->m_process finished() signal. We call there SshRemoteProcessRunner::setState(), and that calls d->m_process.reset(), so it invokes m_process d'tor directly. Delete later m_process instead in both cases. Change-Id: I4a0f2a631b676b57e8bcc3a7878620bc76dc74de Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QtcProcess: Introduce done() signalJarek Kobus2022-04-043-13/+7
| | | | | | | | | | | | | | | | 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>
* QtcProcess: Get rid of setErrorString() methodJarek Kobus2022-04-042-1/+11
| | | | | | | | | | | | It's internal method, not meant to be used outside. It's only used in case of FailedToStart error. Remove it also from ProcessInterface. Leave it inside DefaultImpl and its subclasses only. Remove m_errorString field from ProcessSetupData. Change-Id: Ie605b95c2ff605ab1259045f1a5b16049207c1d3 Reviewed-by: hjk <hjk@qt.io>
* SshRemoteProcessRunner: Get rid of no-op call to QtcProcess::terminate()Jarek Kobus2022-03-311-4/+1
| | | | | | | | | Calling QtcProcess::terminate() after disconecting from process signals is a task for implicit ProcessReaper. Delete the process instead. Change-Id: I02d9b892125b1a1053aefe8edbc7bc96bac41381 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-03-181-1/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/webassembly/webassemblytoolchain.cpp Change-Id: Ia75c783e3ecab1f97de2b5c73a0979c49da82009
| * Make the setup info visually more noticeableJarek Kobus2022-03-181-1/+2
| | | | | | | | | | | | | | | | | | | | By adding two leading newlines we separate it nicely from the other part of the test log. Amends 66c5b1e11e1f80c4113bea940302ea79926a0c13 Change-Id: Ic260cdc4cc2421ddb04bc5027082521800b268e8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-03-173-1/+111
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/plugins/android/androiddevice.cpp src/plugins/docker/dockerdevice.cpp Change-Id: Id16ba0d9993c9f608242622aceae0a2a6691e05e
| * RemoteLinux: Avoid unexpected password dialog in testsChristian Stenger2022-03-163-1/+111
| | | | | | | | | | | | | | | | | | | | Make the test depend on environment variables and give some hint how to run the test correctly. Beside this make the test work on Windows and share the setup with ssh unit test. Change-Id: I6bbf1ec863449512646ca2c51d13fec537beedbc Reviewed-by: hjk <hjk@qt.io>
* | SshRemoteProcess: Add missing overrideJarek Kobus2022-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | At some point QtcProcess::start() started to be virtual, so the intention is that SshRemoteProcess overrides it. Amends 95c9579c58d8cd9dfacbeee70f84920ab9cf87e7 Change-Id: Iff0c0984f07440c58c5f89a0f5e188503756d6d0 Reviewed-by: hjk <hjk@qt.io>
* | SshRemoteProcessRunner: Remove unimplemented methodJarek Kobus2022-03-021-1/+0
| | | | | | | | | | | | Change-Id: I4c075da36bc4f50a35692fd1ae2a61504954a05d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | SshRemoteProcessRunner: Unify APIJarek Kobus2022-03-022-4/+4
| | | | | | | | | | | | | | | | | | Make the API more similar to QtcProcess API. Rename signals to started() and finished(). Change-Id: I01f3a148749b666b8f145d8769222a234ccc9bce Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | SshRemoteProcessRunner: Drop error string from processClosed()Jarek Kobus2022-03-022-2/+2
| | | | | | | | | | | | Change-Id: I3d05fb253944d6fa47854693aa4ee21d36b35a32 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | SshRemoteProcessRunner: Unify APIJarek Kobus2022-03-022-15/+15
| | | | | | | | | | | | | | | | | | | | Make the API more similar to QtcProcess API. Drop process prefix for getters. Change-Id: I21b99bb5b11956d923c0e526c08bbea9686e5c95 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>
* | SshRemoteProcess: Rename done() -> finished()Jarek Kobus2022-02-283-12/+17
| | | | | | | | | | | | Change-Id: I9c22d075f50b0a2a171cbda11c7579e4735f3f4e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | SshRemoteProcess: Get rid of error arg from done() signalJarek Kobus2022-02-284-8/+7
| | | | | | | | | | | | | | Prepare for signal rename done() -> finished(). Change-Id: I81a7bd0a4826ce6200f4af47ba5868ceedb42206 Reviewed-by: hjk <hjk@qt.io>
* | SshRemoteProcessRunner: Don't buffer stdOut and stdErrJarek Kobus2022-02-252-24/+4
| | | | | | | | | | | | | | | | It's already being buffered inside SshRemoteProcess. Change-Id: Iaee7e9f04f93196a1016d0e2d55a17ee88d35530 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | Get rid of SshProcess (one process class less)Jarek Kobus2022-02-219-107/+42
| | | | | | | | | | | | | | | | | | 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>
* | Ssh: Drop ProcessMode from c'tors and creator methodsJarek Kobus2022-02-187-20/+13
| | | | | | | | | | | | Change-Id: I2db51f26d9a841f60d5ab3722fa82b3a89d57146 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* | Make SshSettings thread safeJarek Kobus2022-02-151-5/+41
| | | | | | | | | | | | | | Change-Id: Iac07ee51574c348a22c6a966eb2113c53402b88d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Utils: Move QtcProcess constructor setup data to shared setup datahjk2022-02-111-1/+2
| | | | | | | | | | | | | | | | This includes replacing DeviceProcess terminal handling with base member. Change-Id: Id1541bfce33c71dddc71b4816ad0b174dce3879c Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-02-111-2/+0
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
| * Fix crash reporting in output pane when remote run in terminalJarek Kobus2022-02-091-2/+0
| | | | | | | | | | | | | | Fixes: QTCREATORBUG-27007 Change-Id: I6e409eb6489530dc6c48c90d20e28ff019eff187 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-02-071-0/+1
|\ \ | |/ | | | | Change-Id: I967615c66a11bb4823a6b403ca59e63dd1971032
| * LinuxDevice: Implement runProcess()Jarek Kobus2022-02-031-0/+1
| | | | | | | | | | Change-Id: I5300d36119ffb9fdd82a2ba7e02f76edc0fe2eda Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/7.0'Eike Ziller2022-01-283-2/+2
|\ \ | |/ | | | | | | | | | | Conflicts: src/libs/ssh/sshremoteprocessrunner.h Change-Id: I4ce088c68704845ec8ec6feaad10bf747e415bec
| * SshRemoteProcessRunner: Remove unused command() methodJarek Kobus2022-01-282-2/+0
| | | | | | | | | | Change-Id: If45ea80b892cb683aa3737dd73244fa4b669abc4 Reviewed-by: hjk <hjk@qt.io>
| * QtcProcess: Get rid of useTerminalJarek Kobus2022-01-284-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove SshRemoteProcessRunner::runInTerminal() method, it wasn't used anywhere (just in test). Remove QtcProcess::useTerminal, as process should be created in TerminalOn mode when there is a need for terminal. Add a parameter to SshRemoteProcess::fullLocalCommandLine(bool inTerminal) as this may still be needed when running application through ssh from terminal (ssh -tt option). Change-Id: I71911082fcca190b82a1106a2ca1ca48dc5d4c79 Reviewed-by: hjk <hjk@qt.io> (cherry picked from commit 95a9b22f6fe07f8417ad94722d456d4a5730f068)
| * Ssh: fix crash on freed memory accessAlexander Drozdov2022-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | At the cleanup() method we must remove connection from the m_connection list to avoid access to the freed memory from the removeInactiveConnections() that caused Qt Creator crash. Change-Id: I8195f05e903819e3e3b48b2f72fd71047c5a1636 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* | QtcProcess: Get rid of useTerminalJarek Kobus2022-01-284-14/+3
|/ | | | | | | | | | | | | | Remove SshRemoteProcessRunner::runInTerminal() method, it wasn't used anywhere (just in test). Remove QtcProcess::useTerminal, as process should be created in TerminalOn mode when there is a need for terminal. Add a parameter to SshRemoteProcess::fullLocalCommandLine(bool inTerminal) as this may still be needed when running application through ssh from terminal (ssh -tt option). Change-Id: I71911082fcca190b82a1106a2ca1ca48dc5d4c79 Reviewed-by: hjk <hjk@qt.io>
* Remove qmake build filesEike Ziller2022-01-203-41/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Refactor SshConnectionManager internalsJarek Kobus2022-01-121-95/+90
| | | | | | | | | It makes it easier to manage just one hash of connections instead of 3 lists. Change-Id: Id6a3661d8dfdb0bd269e35ece36410bd2477e5c6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove unused method declarationJarek Kobus2022-01-041-2/+0
| | | | | | | | | Amends 20d19aa5bf0c296a21b398d7f6b9430ebae81ac5 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>