2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Lorenz Haas
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-05-11 19:59:46 +02:00
|
|
|
|
|
|
|
|
#include "command.h"
|
|
|
|
|
|
2018-08-29 14:36:47 +02:00
|
|
|
namespace TextEditor {
|
2014-05-11 19:59:46 +02:00
|
|
|
|
2015-09-17 21:27:25 +02:00
|
|
|
bool Command::isValid() const
|
|
|
|
|
{
|
|
|
|
|
return !m_executable.isEmpty();
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-07 18:02:53 +01:00
|
|
|
Utils::FilePath Command::executable() const
|
2014-05-11 19:59:46 +02:00
|
|
|
{
|
|
|
|
|
return m_executable;
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-07 18:02:53 +01:00
|
|
|
void Command::setExecutable(const Utils::FilePath &executable)
|
2014-05-11 19:59:46 +02:00
|
|
|
{
|
|
|
|
|
m_executable = executable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QStringList Command::options() const
|
|
|
|
|
{
|
|
|
|
|
return m_options;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Command::addOption(const QString &option)
|
|
|
|
|
{
|
|
|
|
|
m_options << option;
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-03 15:20:13 +03:00
|
|
|
void Command::addOptions(const QStringList &options)
|
|
|
|
|
{
|
|
|
|
|
m_options += options;
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-11 19:59:46 +02:00
|
|
|
Command::Processing Command::processing() const
|
|
|
|
|
{
|
|
|
|
|
return m_processing;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Command::setProcessing(const Processing &processing)
|
|
|
|
|
{
|
|
|
|
|
m_processing = processing;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Command::pipeAddsNewline() const
|
|
|
|
|
{
|
|
|
|
|
return m_pipeAddsNewline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Command::setPipeAddsNewline(bool pipeAddsNewline)
|
|
|
|
|
{
|
|
|
|
|
m_pipeAddsNewline = pipeAddsNewline;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-09 08:59:38 +02:00
|
|
|
bool Command::returnsCRLF() const
|
|
|
|
|
{
|
|
|
|
|
return m_returnsCRLF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Command::setReturnsCRLF(bool returnsCRLF)
|
|
|
|
|
{
|
|
|
|
|
m_returnsCRLF = returnsCRLF;
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-29 14:36:47 +02:00
|
|
|
} // namespace TextEditor
|