[libcalamares] Allow CommandLine to have unset timeout

- Introduce enum for the appropriate constant
 - If the timeout isn't set, then defer to the timeout set
   on the commandlist when running the commands.
This commit is contained in:
Adriaan de Groot 2018-01-29 21:25:18 +01:00
parent c641f5dec6
commit 2da430fa36
3 changed files with 14 additions and 11 deletions

View file

@ -33,14 +33,16 @@ namespace CalamaresUtils
*/
struct CommandLine : public QPair< QString, int >
{
enum { TimeoutNotSet = -1 };
/// An invalid command line
CommandLine()
: QPair< QString, int >( QString(), -1 )
: QPair< QString, int >( QString(), TimeoutNotSet )
{
}
CommandLine( const QString& s )
: QPair< QString, int >( s, 10 )
: QPair< QString, int >( s, TimeoutNotSet )
{
}