Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 4b4c935..2d20706 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -49,32 +49,38 @@ $Id$ #include "resourcefileconfig.h" #include "stdaddressbook.h" //US #include "../../formats/vcardformatplugin2.h" //US #include "../../formats/binaryformat.h" #include "resourcefile.h" using namespace KABC; extern "C" +#ifdef _WIN32_ +__declspec(dllexport) +#else { +#endif + //US void *init_kabc_file() void *init_microkabc_file() { return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); } +#ifndef _WIN32_ } - +#endif ResourceFile::ResourceFile( const KConfig *config ) : Resource( config ) , mFormat( 0 ) { QString fileName, formatName; KConfig *cfg = (KConfig *)config; if ( cfg ) { fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); formatName = cfg->readEntry( "FileFormat", "vcard" ); // qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() ); } else { @@ -128,24 +134,26 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) setFileName( fileName ); } ResourceFile::~ResourceFile() { delete mFormat; mFormat = 0; } void ResourceFile::writeConfig( KConfig *config ) { + + config->setGroup( "Resource_" + identifier() ); Resource::writeConfig( config ); config->writeEntry( "FileName", mFileName ); config->writeEntry( "FileFormat", mFormatName ); // qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); } Ticket *ResourceFile::requestSaveTicket() { kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; |