[libcalamares] Small step in implementation
This commit is contained in:
parent
e0fdde06c9
commit
b9dac6eef8
@ -22,6 +22,7 @@ namespace Utils
|
||||
struct Runner::Private
|
||||
{
|
||||
QStringList m_command;
|
||||
RunLocation m_location = RunLocation::RunInHost;
|
||||
};
|
||||
|
||||
Runner::Runner() {}
|
||||
@ -33,6 +34,12 @@ Runner::Runner( const QStringList& command )
|
||||
|
||||
Runner::~Runner() {}
|
||||
|
||||
Runner&
|
||||
Runner::setCommand( const QStringList& command )
|
||||
{
|
||||
d->m_command = command;
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
} // namespace Calamares
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "CalamaresUtilsSystem.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
|
||||
@ -27,6 +28,7 @@ namespace Utils
|
||||
|
||||
using RunLocation = CalamaresUtils::System::RunLocation;
|
||||
|
||||
/** @brief A Runner wraps a process and handles running it and signalling */
|
||||
class Runner : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -39,7 +41,7 @@ public:
|
||||
Runner& setCommand( const QStringList& command );
|
||||
Runner& setLocation( RunLocation r );
|
||||
Runner& setWorkingDirectory( const QString& directory );
|
||||
// TODO: maybe with QDir as well?
|
||||
Runner& setWorkingDirectory( const QDir& directory );
|
||||
Runner& setTimeout( std::chrono::seconds timeout );
|
||||
Runner& setInput( const QString& stdin );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user