forked from qt-creator/qt-creator
LinuxDeviceProcess: Remove unused setRcFilesToSource()
Change-Id: Ica834cbecfa481a3a6c94519a9799c4b917d49a1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -49,11 +49,6 @@ LinuxDeviceProcess::LinuxDeviceProcess(const QSharedPointer<const ProjectExplore
|
||||
});
|
||||
}
|
||||
|
||||
void LinuxDeviceProcess::setRcFilesToSource(const QStringList &filePaths)
|
||||
{
|
||||
m_rcFilesToSource = filePaths;
|
||||
}
|
||||
|
||||
QByteArray LinuxDeviceProcess::readAllStandardOutput()
|
||||
{
|
||||
QByteArray output = SshDeviceProcess::readAllStandardOutput();
|
||||
@@ -88,7 +83,8 @@ QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||
{
|
||||
CommandLine cmd;
|
||||
|
||||
for (const QString &filePath : rcFilesToSource()) {
|
||||
const QStringList rcFilesToSource = {"/etc/profile", "$HOME/.profile"};
|
||||
for (const QString &filePath : rcFilesToSource) {
|
||||
cmd.addArgs({"test", "-f", filePath});
|
||||
cmd.addArgs("&&", CommandLine::Raw);
|
||||
cmd.addArgs({".", filePath});
|
||||
@@ -116,11 +112,4 @@ QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||
return cmd.arguments();
|
||||
}
|
||||
|
||||
const QStringList LinuxDeviceProcess::rcFilesToSource() const
|
||||
{
|
||||
if (!m_rcFilesToSource.isEmpty())
|
||||
return m_rcFilesToSource;
|
||||
return {"/etc/profile", "$HOME/.profile"};
|
||||
}
|
||||
|
||||
} // namespace RemoteLinux
|
||||
|
||||
@@ -40,18 +40,12 @@ public:
|
||||
explicit LinuxDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
// Files to source before executing the command (if they exist). Overrides the default.
|
||||
void setRcFilesToSource(const QStringList &filePaths);
|
||||
|
||||
QByteArray readAllStandardOutput() override;
|
||||
|
||||
private:
|
||||
QString fullCommandLine(const ProjectExplorer::Runnable &) const override;
|
||||
qint64 processId() const override;
|
||||
|
||||
const QStringList rcFilesToSource() const;
|
||||
|
||||
QStringList m_rcFilesToSource;
|
||||
QByteArray m_output;
|
||||
qint64 m_processId = 0;
|
||||
bool m_pidParsed = false;
|
||||
|
||||
Reference in New Issue
Block a user