summaryrefslogtreecommitdiff
path: root/src/libs/ssh/sshremoteprocessrunner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of SshRemoteProcessRunnerJarek Kobus2022-05-091-214/+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>
* 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-041-4/+6
| | | | | | | | | | | | | | | | 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>
* 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>
* SshRemoteProcessRunner: Unify APIJarek Kobus2022-03-021-2/+2
| | | | | | | | | 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-021-1/+1
| | | | | | Change-Id: I3d05fb253944d6fa47854693aa4ee21d36b35a32 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* SshRemoteProcessRunner: Unify APIJarek Kobus2022-03-021-11/+11
| | | | | | | | | | 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-281-1/+1
| | | | | | 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-281-2/+2
| | | | | | | Prepare for signal rename done() -> finished(). Change-Id: I81a7bd0a4826ce6200f4af47ba5868ceedb42206 Reviewed-by: hjk <hjk@qt.io>
* SshRemoteProcessRunner: Don't buffer stdOut and stdErrJarek Kobus2022-02-251-22/+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>
* SshRemoteProcessRunner: Remove unused command() methodJarek Kobus2022-01-281-1/+0
| | | | | Change-Id: If45ea80b892cb683aa3737dd73244fa4b669abc4 Reviewed-by: hjk <hjk@qt.io>
* QtcProcess: Get rid of useTerminalJarek Kobus2022-01-281-10/+0
| | | | | | | | | | | | | | | 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: Use base QtcProcess' useTerminal for SshRemoteProcesshjk2021-12-061-2/+1
| | | | | | | | | Still trying to ramp down non-QtcProcess interfaces. Change-Id: I6b4ae6788f5021959ff3eb35bbade2157a6d67fa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Remove unused SshRemoteProcessRunner::writeDataToProcess()Jarek Kobus2021-11-171-6/+0
| | | | | Change-Id: Ib07c7c9cd19b498f84382d2c9c11b927533e4d85 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Ssh: Re-base SshProcess on top of QtcProcessJarek Kobus2021-09-131-3/+3
| | | | | Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83 Reviewed-by: hjk <hjk@qt.io>
* Control the lifetime of SshProcessManagerJarek Kobus2021-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | Make it possible to control when the SshProcessManager is being constructed / destructed. Expose public constructor. Since different singletons depend on each other, we need to control the order of creation and destruction of them. The order of creation is like that: 1. QCoreApplication 2. ProcessReaper 3. ProcessLauncher 4. SshConnectionManager The order of destruction must be opposite to the above. Change-Id: Ice07eb751cd61c03cb461816fa1b74ab040a53de Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Some clang-tidy -use-modernize-nullptrhjk2019-08-011-2/+2
| | | | | Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* SSH: Pass remote command as QStringChristian Kandeler2019-05-241-6/+5
| | | | | | | | | | 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>
* SSH: Use OpenSSH toolsChristian Kandeler2018-12-131-61/+27
| | | | | | | | | | | | | | | | | | | | | | | | ... instead of our own SSH library. Advantages: - Full compatibility with OpenSSH behavior guaranteed. - Minimal maintenance effort. - Less code to build. - Big chunk of 3rd party sources can be removed from our repository. One the downside, Windows users now need to install OpenSSH for RemoteLinux support. Hoewever, people doing embedded development probably have it installed anyway. [ChangeLog] Switched SSH backend to OpenSSH Fixes: QTCREATORBUG-15744 Fixes: QTCREATORBUG-15807 Fixes: QTCREATORBUG-19306 Fixes: QTCREATORBUG-20210 Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* SSH: Use Qt5-style connectsOrgad Shaneh2016-06-151-4/+8
| | | | | | | The heavy lifting was done by clazy. Change-Id: I04261849c92c54990f9f142fe541d984c5fb21d3 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Port to new connect apiMontel Laurent2015-02-041-4/+5
|/ | | | | | Change-Id: I84834f37dd15108ed8c5fbf5353bcabc4e564f70 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Clean up SshConnectionManager interfacehjk2013-09-111-2/+2
| | | | | Change-Id: Id1541f83f431171dbdd94d5dd48f93e1c2cdf6fb Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Doc: use standard wording in \brief commandsLeena Miettinen2013-06-201-1/+2
| | | | | | | | | QDoc does some magic with the \class and \namespaces and \brief commands, so the following wording must be used: "The xxx class yyy ..." Change-Id: Id231f30e8464898b776888d5423523de404aae34 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* SSH: Streamline SshRemoteProcessRunner's output handling.Christian Kandeler2012-06-081-2/+20
| | | | | | | | | | Make it just like SshRemoteProcess (and QProcess). The current implementation annoyingly forces client code to establish additional signal/slot connections, even if they only want to evaluate the output at the end. Change-Id: Id8c30dd156574d7d26d848d8e0705856a16d3747 Reviewed-by: hjk <qthjk@ovi.com>
* SSH: Name SshRemoteProcess::ExitStatus values like the QProcess ones.Christian Kandeler2012-06-081-4/+4
| | | | | | | | (We cannot use QProcess::ExitStatus itself, because it does not contain FailedToStart.) Change-Id: I83ed6de621e2693e539562cd8e56ef478fa4fcb9 Reviewed-by: hjk <qthjk@ovi.com>
* SSH: Use plain pointers to SshConnection objects.Christian Kandeler2012-05-291-6/+6
| | | | | | | | | | It used to be shared pointers so that existing connection objects could easily be passed around in order not to open a new connection to the same server. Since the introduction of the SshConnectionManager, this is no longer necessary. Change-Id: I13fd3eceaf35d562e6260e9969abbffb01edd6b5 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
* Move SSH support into a dedicated library.Christian Kandeler2012-05-221-0/+269
It does not belong into libUtils, which is a collection of small unrelated utility classes. Task-number: QTCREATORBUG-7218 Change-Id: Id92b9f28678afec93e6f07166adfde6550f38072 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>