[preservefiles] Accessor for item-type (needed for tests)
This commit is contained in:
parent
8b5e49d980
commit
a1b7ba0dc5
@ -124,7 +124,7 @@ Item::exec( const std::function< QString( QString ) >& replacements ) const
|
||||
QString full_dest = CalamaresUtils::System::instance()->targetPath( expanded_dest );
|
||||
|
||||
bool success = false;
|
||||
switch ( type )
|
||||
switch ( m_type )
|
||||
{
|
||||
case ItemType::None:
|
||||
cWarning() << "Invalid item for preservefiles skipped.";
|
||||
|
@ -35,23 +35,24 @@ class Item
|
||||
QString source;
|
||||
QString dest;
|
||||
CalamaresUtils::Permissions perm;
|
||||
ItemType type;
|
||||
ItemType m_type;
|
||||
|
||||
public:
|
||||
Item( const QString& src, const QString& d, CalamaresUtils::Permissions p, ItemType t )
|
||||
: source( src )
|
||||
, dest( d )
|
||||
, perm( std::move( p ) )
|
||||
, type( t )
|
||||
, m_type( t )
|
||||
{
|
||||
}
|
||||
|
||||
Item()
|
||||
: type( ItemType::None )
|
||||
: m_type( ItemType::None )
|
||||
{
|
||||
}
|
||||
|
||||
operator bool() const { return type != ItemType::None; }
|
||||
operator bool() const { return m_type != ItemType::None; }
|
||||
ItemType type() const { return m_type; }
|
||||
|
||||
bool exec( const std::function< QString( QString ) >& replacements ) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user