forked from qt-creator/qt-creator
Utils: Move CommandLine to fileutils.{cpp,h}
Causes less #include hassle when using downstream instead of command/argument pairs. Change-Id: I0fa0d016374df0b8e0a22f3786623652af684d36 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -128,6 +128,29 @@ using FilePathList = QList<FilePath>;
|
||||
using FileName = FilePath;
|
||||
using FileNameList = FilePathList;
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT CommandLine
|
||||
{
|
||||
public:
|
||||
CommandLine() {}
|
||||
|
||||
CommandLine(const FilePath &executable, const QString &arguments)
|
||||
: m_executable(executable), m_arguments(arguments)
|
||||
{}
|
||||
|
||||
void addArg(const QString &arg);
|
||||
void addArgs(const QStringList &inArgs);
|
||||
void addArgs(const QString &inArgs);
|
||||
|
||||
QString toUserOutput() const;
|
||||
|
||||
FilePath executable() const { return m_executable; }
|
||||
QString arguments() const { return m_arguments; }
|
||||
|
||||
private:
|
||||
FilePath m_executable;
|
||||
QString m_arguments;
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FileUtils {
|
||||
public:
|
||||
static bool removeRecursively(const FilePath &filePath, QString *error = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user