[shellprocess] Make CommandList chroot-aware
This is prep-work for moving commandlist to libcalamares, where it can be re-used by more modules.
This commit is contained in:
parent
8bd40fdcd5
commit
e48767eaa6
@ -37,12 +37,13 @@ static QStringList get_variant_stringlist(const QVariantList& l)
|
|||||||
return retl;
|
return retl;
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandList::CommandList()
|
CommandList::CommandList( bool doChroot )
|
||||||
|
: m_doChroot( doChroot )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandList::CommandList::CommandList(const QVariant& v)
|
CommandList::CommandList::CommandList( const QVariant& v, bool doChroot )
|
||||||
: CommandList()
|
: CommandList( doChroot )
|
||||||
{
|
{
|
||||||
if ( v.type() == QVariant::List )
|
if ( v.type() == QVariant::List )
|
||||||
{
|
{
|
||||||
|
@ -25,15 +25,20 @@
|
|||||||
class CommandList : protected QStringList
|
class CommandList : protected QStringList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CommandList();
|
CommandList( bool doChroot = true );
|
||||||
CommandList(const QVariant& v);
|
CommandList( const QVariant& v, bool doChroot = true );
|
||||||
~CommandList();
|
~CommandList();
|
||||||
|
|
||||||
|
bool doChroot() const { return m_doChroot; }
|
||||||
|
|
||||||
using QStringList::isEmpty;
|
using QStringList::isEmpty;
|
||||||
using QStringList::count;
|
using QStringList::count;
|
||||||
using QStringList::cbegin;
|
using QStringList::cbegin;
|
||||||
using QStringList::cend;
|
using QStringList::cend;
|
||||||
using QStringList::const_iterator;
|
using QStringList::const_iterator;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_doChroot;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
#endif // COMMANDLIST_H
|
#endif // COMMANDLIST_H
|
||||||
|
Loading…
Reference in New Issue
Block a user