diff --git a/src/libcalamares/utils/Runner.cpp b/src/libcalamares/utils/Runner.cpp index 0b0fed9ae..405ef68fb 100644 --- a/src/libcalamares/utils/Runner.cpp +++ b/src/libcalamares/utils/Runner.cpp @@ -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 diff --git a/src/libcalamares/utils/Runner.h b/src/libcalamares/utils/Runner.h index 08fa45a5c..85c679180 100644 --- a/src/libcalamares/utils/Runner.h +++ b/src/libcalamares/utils/Runner.h @@ -13,6 +13,7 @@ #include "CalamaresUtilsSystem.h" +#include #include #include @@ -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 );