Example #1
0
void ResourceNet::setFormat( const QString &name )
{
    mFormatName = name;
    delete mFormat;

    FormatFactory *factory = FormatFactory::self();
    mFormat = factory->format( mFormatName );
}
Example #2
0
void ResourceNet::init( const KUrl &url, const QString &format )
{
    d->mLoadJob = 0;
    d->mIsLoading = false;
    d->mSaveJob = 0;
    d->mIsSaving = false;

    mFormatName = format;

    FormatFactory *factory = FormatFactory::self();
    mFormat = factory->format( mFormatName );
    if ( !mFormat ) {
        mFormatName = QLatin1String( "vcard" );
        mFormat = factory->format( mFormatName );
    }

    setUrl( url );
}