Logo Search packages:      
Sourcecode: kdar version File versions  Download package

libdar::et_mask KDarConfig::libdarCreateCompressionMask (  ) 

Returns the full creation compression mask.

Definition at line 2070 of file kdarConfig.cpp.

References compressionMaskList(), compressionMaskType(), and kdar::toStdString().

Referenced by createArchiveThread::run().

{
    libdar::et_mask compr_mask;
    libdar::ou_mask compr_list;
    QStringList compressionList = compressionMaskList();
    //Iterate over the QStringList, adding the masks to the libdar::ou_mask
    for( QStringList::Iterator it = compressionList.begin(); it != compressionList.end(); ++it )
    {
// TODO store case sensitive filter info and give user option to toggle
        bool caseSensitive = false;
        compr_list.add_mask( libdar::simple_mask( kdar::toStdString( *it ), caseSensitive ) );
    }
    //If the compression list contains items, add them to the compression mask
    if ( !compressionList.empty() )
    {
        //compress
        if ( compressionMaskType() == KDar::INCLUDE )
        {
            compr_mask.add_mask( compr_list );
        }
        //do not compress
        else
        {
            compr_mask.add_mask( libdar::not_mask( compr_list ) );
        }
    }
    //otherwise, we compress everything
    else
    {
        compr_mask.add_mask( libdar::bool_mask( true ) );
    }

    return compr_mask;

}


Generated by  Doxygen 1.6.0   Back to index