Logo Search packages:      
Sourcecode: kaider-kde4 version File versions  Download package

ConversionStatus CatalogImportPlugin::open ( const QString &  file,
const QString &  mimetype,
Catalog catalog 
)

Load the file and fill the corresponding catalog. The file is considered to be of mimetype MIME type.

Parameters:
file local file name to be opened
mimetype the MIME type is should be handled as
catalog the catalog to be filled
Returns:
result of the operation

Definition at line 108 of file importplugin.cpp.

References commitTransaction(), d, load(), and startTransaction().

{
    d->_stopped=false;
    d->_catalog=catalog;
    startTransaction();
    
    ConversionStatus result = load(file, mimetype);
    if( d->_stopped ) 
    {
      d->_started=false;
      return STOPPED;
    }

    if( result == OK || result == RECOVERED_PARSE_ERROR || result == RECOVERED_HEADER_ERROR )
      commitTransaction(file);
      
    return result;
}


Generated by  Doxygen 1.6.0   Back to index