author | zautrix <zautrix> | 2004-07-08 00:16:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-08 00:16:46 (UTC) |
commit | e8628e6e3e98f2276fb69bbc545866cc9a022228 (patch) (unidiff) | |
tree | 798f61100c1ec3dab71a00ba63ac0d99fbd643b1 /kabc/plugins/file/resourcefile.cpp | |
parent | 5030b0bd32b1e526f28ce0339d4b4854492393ae (diff) | |
download | kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.zip kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.gz kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.bz2 |
Compile fixes for windows
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$ | |||
49 | #include "resourcefileconfig.h" | 49 | #include "resourcefileconfig.h" |
50 | #include "stdaddressbook.h" | 50 | #include "stdaddressbook.h" |
51 | 51 | ||
52 | //US #include "../../formats/vcardformatplugin2.h" | 52 | //US #include "../../formats/vcardformatplugin2.h" |
53 | //US #include "../../formats/binaryformat.h" | 53 | //US #include "../../formats/binaryformat.h" |
54 | 54 | ||
55 | 55 | ||
56 | #include "resourcefile.h" | 56 | #include "resourcefile.h" |
57 | 57 | ||
58 | using namespace KABC; | 58 | using namespace KABC; |
59 | 59 | ||
60 | extern "C" | 60 | extern "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 | ||
70 | ResourceFile::ResourceFile( const KConfig *config ) | 76 | ResourceFile::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 | ||
75 | KConfig *cfg = (KConfig *)config; | 81 | KConfig *cfg = (KConfig *)config; |
76 | if ( cfg ) { | 82 | if ( cfg ) { |
77 | fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); | 83 | fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); |
78 | formatName = cfg->readEntry( "FileFormat", "vcard" ); | 84 | formatName = cfg->readEntry( "FileFormat", "vcard" ); |
79 | // qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() ); | 85 | // qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() ); |
80 | } else { | 86 | } else { |
@@ -128,24 +134,26 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) | |||
128 | 134 | ||
129 | setFileName( fileName ); | 135 | setFileName( fileName ); |
130 | } | 136 | } |
131 | 137 | ||
132 | ResourceFile::~ResourceFile() | 138 | ResourceFile::~ResourceFile() |
133 | { | 139 | { |
134 | delete mFormat; | 140 | delete mFormat; |
135 | mFormat = 0; | 141 | mFormat = 0; |
136 | } | 142 | } |
137 | 143 | ||
138 | void ResourceFile::writeConfig( KConfig *config ) | 144 | void 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()); |
146 | 154 | ||
147 | } | 155 | } |
148 | 156 | ||
149 | Ticket *ResourceFile::requestSaveTicket() | 157 | Ticket *ResourceFile::requestSaveTicket() |
150 | { | 158 | { |
151 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; | 159 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; |