summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file
Unidiff
Diffstat (limited to 'kabc/plugins/file') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/file/file.pro5
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
2 files changed, 14 insertions, 1 deletions
diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro
index a5ade93..7cf7c58 100644
--- a/kabc/plugins/file/file.pro
+++ b/kabc/plugins/file/file.pro
@@ -21,10 +21,15 @@ SOURCES = \
21 21
22unix : { 22unix : {
23OBJECTS_DIR = obj/unix 23OBJECTS_DIR = obj/unix
24MOC_DIR = moc/unix 24MOC_DIR = moc/unix
25} 25}
26win32: { 26win32: {
27CONFIG += dll
27DEFINES += _WIN32_ 28DEFINES += _WIN32_
28OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
29MOC_DIR = moc/win 30MOC_DIR = moc/win
31LIBS += ../../../bin/microkdepim.lib
32LIBS += ../../../bin/microkcal.lib
33LIBS += ../../../bin/microkde.lib
34LIBS += ../../../bin/microkabc.lib
30} \ No newline at end of file 35} \ No newline at end of file
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
@@ -55,20 +55,26 @@ $Id$
55 55
56#include "resourcefile.h" 56#include "resourcefile.h"
57 57
58using namespace KABC; 58using namespace KABC;
59 59
60extern "C" 60extern "C"
61#ifdef _WIN32_
62__declspec(dllexport)
63#else
61{ 64{
65#endif
66
62//US void *init_kabc_file() 67//US void *init_kabc_file()
63 void *init_microkabc_file() 68 void *init_microkabc_file()
64 { 69 {
65 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); 70 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>();
66 } 71 }
72#ifndef _WIN32_
67} 73}
68 74#endif
69 75
70ResourceFile::ResourceFile( const KConfig *config ) 76ResourceFile::ResourceFile( const KConfig *config )
71 : Resource( config ) , mFormat( 0 ) 77 : Resource( config ) , mFormat( 0 )
72{ 78{
73 QString fileName, formatName; 79 QString fileName, formatName;
74 80
@@ -134,12 +140,14 @@ ResourceFile::~ResourceFile()
134 delete mFormat; 140 delete mFormat;
135 mFormat = 0; 141 mFormat = 0;
136} 142}
137 143
138void ResourceFile::writeConfig( KConfig *config ) 144void ResourceFile::writeConfig( KConfig *config )
139{ 145{
146
147 config->setGroup( "Resource_" + identifier() );
140 Resource::writeConfig( config ); 148 Resource::writeConfig( config );
141 149
142 config->writeEntry( "FileName", mFileName ); 150 config->writeEntry( "FileName", mFileName );
143 config->writeEntry( "FileFormat", mFormatName ); 151 config->writeEntry( "FileFormat", mFormatName );
144 152
145// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); 153// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1());