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 | |
parent | 5030b0bd32b1e526f28ce0339d4b4854492393ae (diff) | |
download | kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.zip kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.gz kdepimpi-e8628e6e3e98f2276fb69bbc545866cc9a022228.tar.bz2 |
Compile fixes for windows
-rw-r--r-- | kabc/plugins/dir/dir.pro | 5 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 11 | ||||
-rw-r--r-- | kabc/plugins/file/file.pro | 5 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 10 |
4 files changed, 28 insertions, 3 deletions
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro index 3db201f..0023029 100644 --- a/kabc/plugins/dir/dir.pro +++ b/kabc/plugins/dir/dir.pro | |||
@@ -20,10 +20,15 @@ SOURCES = \ | |||
20 | 20 | ||
21 | unix : { | 21 | unix : { |
22 | OBJECTS_DIR = obj/unix | 22 | OBJECTS_DIR = obj/unix |
23 | MOC_DIR = moc/unix | 23 | MOC_DIR = moc/unix |
24 | } | 24 | } |
25 | win32: { | 25 | win32: { |
26 | CONFIG += dll | ||
26 | DEFINES += _WIN32_ | 27 | DEFINES += _WIN32_ |
27 | OBJECTS_DIR = obj/win | 28 | OBJECTS_DIR = obj/win |
28 | MOC_DIR = moc/win | 29 | MOC_DIR = moc/win |
30 | LIBS += ../../../bin/microkdepim.lib | ||
31 | LIBS += ../../../bin/microkcal.lib | ||
32 | LIBS += ../../../bin/microkde.lib | ||
33 | LIBS += ../../../bin/microkabc.lib | ||
29 | } \ No newline at end of file | 34 | } \ No newline at end of file |
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 6ea2f4b..3cb5179 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -59,20 +59,26 @@ $Id$ | |||
59 | 59 | ||
60 | #include "resourcedir.h" | 60 | #include "resourcedir.h" |
61 | 61 | ||
62 | using namespace KABC; | 62 | using namespace KABC; |
63 | 63 | ||
64 | extern "C" | 64 | extern "C" |
65 | #ifdef _WIN32_ | ||
66 | __declspec(dllexport) | ||
67 | #else | ||
65 | { | 68 | { |
69 | #endif | ||
70 | |||
66 | //US void *init_kabc_dir() | 71 | //US void *init_kabc_dir() |
67 | void *init_microkabc_dir() | 72 | void *init_microkabc_dir() |
68 | { | 73 | { |
69 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>(); | 74 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>(); |
70 | } | 75 | } |
76 | #ifndef _WIN32_ | ||
71 | } | 77 | } |
72 | 78 | #endif | |
73 | 79 | ||
74 | ResourceDir::ResourceDir( const KConfig *config ) | 80 | ResourceDir::ResourceDir( const KConfig *config ) |
75 | : Resource( config ) | 81 | : Resource( config ) |
76 | { | 82 | { |
77 | QString path; | 83 | QString path; |
78 | 84 | ||
@@ -119,13 +125,14 @@ ResourceDir::~ResourceDir() | |||
119 | { | 125 | { |
120 | delete mFormat; | 126 | delete mFormat; |
121 | mFormat = 0; | 127 | mFormat = 0; |
122 | } | 128 | } |
123 | 129 | ||
124 | void ResourceDir::writeConfig( KConfig *config ) | 130 | void ResourceDir::writeConfig( KConfig *config ) |
125 | { | 131 | { |
132 | config->setGroup( "Resource_" + identifier() ); | ||
126 | Resource::writeConfig( config ); | 133 | Resource::writeConfig( config ); |
127 | 134 | ||
128 | config->writeEntry( "FilePath", mPath ); | 135 | config->writeEntry( "FilePath", mPath ); |
129 | config->writeEntry( "FileFormat", mFormatName ); | 136 | config->writeEntry( "FileFormat", mFormatName ); |
130 | } | 137 | } |
131 | 138 | ||
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 | ||
22 | unix : { | 22 | unix : { |
23 | OBJECTS_DIR = obj/unix | 23 | OBJECTS_DIR = obj/unix |
24 | MOC_DIR = moc/unix | 24 | MOC_DIR = moc/unix |
25 | } | 25 | } |
26 | win32: { | 26 | win32: { |
27 | CONFIG += dll | ||
27 | DEFINES += _WIN32_ | 28 | DEFINES += _WIN32_ |
28 | OBJECTS_DIR = obj/win | 29 | OBJECTS_DIR = obj/win |
29 | MOC_DIR = moc/win | 30 | MOC_DIR = moc/win |
31 | LIBS += ../../../bin/microkdepim.lib | ||
32 | LIBS += ../../../bin/microkcal.lib | ||
33 | LIBS += ../../../bin/microkde.lib | ||
34 | LIBS += ../../../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 | ||
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 | ||
@@ -134,12 +140,14 @@ ResourceFile::~ResourceFile() | |||
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()); |