diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-21 16:59:29 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-24 09:08:49 +0000 |
commit | 0a555018d1dda0aafff358774af2b564483a8c1e (patch) | |
tree | 657403526e058ab335f19b28e7283a86b2ac0810 /src/plugins/qnx | |
parent | be0d7aa3e94969234ebf4ba1ae552e973e7b6588 (diff) | |
download | qt-creator-0a555018d1dda0aafff358774af2b564483a8c1e.tar.gz |
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>
Diffstat (limited to 'src/plugins/qnx')
-rw-r--r-- | src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp | 10 | ||||
-rw-r--r-- | src/plugins/qnx/qnxdevicetester.cpp | 5 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp index 0e4a0b6ff5..4263a1e498 100644 --- a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp +++ b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp @@ -292,12 +292,9 @@ void QnxDeployQtLibrariesDialog::checkRemoteDirectoryExistance() QTC_CHECK(m_state == Inactive); m_state = CheckingRemoteDirectory; - m_ui->deployLogWindow->appendPlainText(tr("Checking existence of \"%1\"") .arg(fullRemoteDirectory())); - - const QByteArray cmd = "test -d " + fullRemoteDirectory().toLatin1(); - m_processRunner->run(cmd, m_device->sshParameters()); + m_processRunner->run("test -d " + fullRemoteDirectory(), m_device->sshParameters()); } void QnxDeployQtLibrariesDialog::removeRemoteDirectory() @@ -305,11 +302,8 @@ void QnxDeployQtLibrariesDialog::removeRemoteDirectory() QTC_CHECK(m_state == CheckingRemoteDirectory); m_state = RemovingRemoteDirectory; - m_ui->deployLogWindow->appendPlainText(tr("Removing \"%1\"").arg(fullRemoteDirectory())); - - const QByteArray cmd = "rm -rf " + fullRemoteDirectory().toLatin1(); - m_processRunner->run(cmd, m_device->sshParameters()); + m_processRunner->run("rm -rf " + fullRemoteDirectory(), m_device->sshParameters()); } } // namespace Internal diff --git a/src/plugins/qnx/qnxdevicetester.cpp b/src/plugins/qnx/qnxdevicetester.cpp index b1374519d8..5196043ad2 100644 --- a/src/plugins/qnx/qnxdevicetester.cpp +++ b/src/plugins/qnx/qnxdevicetester.cpp @@ -113,8 +113,7 @@ void QnxDeviceTester::handleGenericTestFinished(TestResult result) m_state = VarRunTest; emit progressMessage(tr("Checking that files can be created in /var/run...")); m_processRunner->run(QStringLiteral("rm %1 > /dev/null 2>&1; echo ABC > %1 && rm %1") - .arg("/var/run/qtc_xxxx.pid") - .toLatin1(), + .arg("/var/run/qtc_xxxx.pid"), m_deviceConfiguration->sshParameters()); } @@ -189,7 +188,7 @@ void QnxDeviceTester::testNextCommand() QString command = m_commandsToTest[m_currentCommandIndex]; emit progressMessage(tr("Checking for %1...").arg(command)); - m_processRunner->run("command -v " + command.toLatin1(), m_deviceConfiguration->sshParameters()); + m_processRunner->run("command -v " + command, m_deviceConfiguration->sshParameters()); } void QnxDeviceTester::setFinished() |