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:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "algorithm.h"
|
||||
#include "qtcassert.h"
|
||||
#include "qtcprocess.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QDir>
|
||||
@@ -66,6 +67,33 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
|
||||
/*! \class Utils::CommandLine
|
||||
|
||||
\brief The CommandLine class represents a command line of a QProcess
|
||||
or similar utility.
|
||||
|
||||
*/
|
||||
|
||||
void CommandLine::addArg(const QString &arg)
|
||||
{
|
||||
QtcProcess::addArg(&m_arguments, arg);
|
||||
}
|
||||
|
||||
void CommandLine::addArgs(const QStringList &inArgs)
|
||||
{
|
||||
QtcProcess::addArgs(&m_arguments, inArgs);
|
||||
}
|
||||
|
||||
void CommandLine::addArgs(const QString &inArgs)
|
||||
{
|
||||
QtcProcess::addArgs(&m_arguments, inArgs);
|
||||
}
|
||||
|
||||
QString CommandLine::toUserOutput() const
|
||||
{
|
||||
return m_executable.toUserOutput() + ' ' + m_arguments;
|
||||
}
|
||||
|
||||
/*! \class Utils::FileUtils
|
||||
|
||||
\brief The FileUtils class contains file and directory related convenience
|
||||
|
||||
Reference in New Issue
Block a user