author | zautrix <zautrix> | 2004-07-07 11:56:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-07 11:56:39 (UTC) |
commit | 56721aac86c9ae5253abac8962474c8d1a7e648a (patch) (unidiff) | |
tree | c12f41eba0d5724ee800cdb92727ffd6d3c1cf6c /kabc | |
parent | 13d88c91f2916090bd45e23b504d0b665c68126f (diff) | |
download | kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.zip kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.gz kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.bz2 |
Changes for compiling on desktop
-rw-r--r-- | kabc/kabc.pro | 4 | ||||
-rw-r--r-- | kabc/plugins/dir/dir.pro | 29 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 6 | ||||
-rw-r--r-- | kabc/plugins/file/file.pro | 30 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 6 |
5 files changed, 69 insertions, 6 deletions
diff --git a/kabc/kabc.pro b/kabc/kabc.pro index ea4bbb7..4a8d73a 100644 --- a/kabc/kabc.pro +++ b/kabc/kabc.pro | |||
@@ -33,25 +33,24 @@ HEADERS = \ | |||
33 | key.h \ | 33 | key.h \ |
34 | field.h \ | 34 | field.h \ |
35 | plugin.h \ | 35 | plugin.h \ |
36 | address.h \ | 36 | address.h \ |
37 | addresseelist.h \ | 37 | addresseelist.h \ |
38 | formatfactory.h \ | 38 | formatfactory.h \ |
39 | formatplugin.h \ | 39 | formatplugin.h \ |
40 | phonenumber.h \ | 40 | phonenumber.h \ |
41 | distributionlist.h \ | 41 | distributionlist.h \ |
42 | distributionlistdialog.h \ | 42 | distributionlistdialog.h \ |
43 | distributionlisteditor.h \ | 43 | distributionlisteditor.h \ |
44 | vcardformatplugin.h \ | 44 | vcardformatplugin.h \ |
45 | formats/binaryformat.h \ | ||
46 | formats/vcardformatplugin2.h \ | 45 | formats/vcardformatplugin2.h \ |
47 | picture.h \ | 46 | picture.h \ |
48 | secrecy.h \ | 47 | secrecy.h \ |
49 | sound.h \ | 48 | sound.h \ |
50 | addressbook.h \ | 49 | addressbook.h \ |
51 | timezone.h \ | 50 | timezone.h \ |
52 | addressee.h \ | 51 | addressee.h \ |
53 | addresseedialog.h \ | 52 | addresseedialog.h \ |
54 | vcardconverter.h \ | 53 | vcardconverter.h \ |
55 | vcard21parser.h \ | 54 | vcard21parser.h \ |
56 | vcardformatimpl.h \ | 55 | vcardformatimpl.h \ |
57 | plugins/file/resourcefile.h \ | 56 | plugins/file/resourcefile.h \ |
@@ -125,32 +124,32 @@ vcard/include/generated/SoundValue-generated.h \ | |||
125 | vcard/include/generated/AgentValue-generated.h \ | 124 | vcard/include/generated/AgentValue-generated.h \ |
126 | vcard/include/generated/TelValue-generated.h \ | 125 | vcard/include/generated/TelValue-generated.h \ |
127 | vcard/include/generated/TextBinValue-generated.h \ | 126 | vcard/include/generated/TextBinValue-generated.h \ |
128 | vcard/include/generated/OrgValue-generated.h \ | 127 | vcard/include/generated/OrgValue-generated.h \ |
129 | vcard/include/generated/UTCValue-generated.h \ | 128 | vcard/include/generated/UTCValue-generated.h \ |
130 | vcard/include/generated/ClassValue-generated.h \ | 129 | vcard/include/generated/ClassValue-generated.h \ |
131 | vcard/include/generated/FloatValue-generated.h \ | 130 | vcard/include/generated/FloatValue-generated.h \ |
132 | vcard/include/generated/TextListValue-generated.h | 131 | vcard/include/generated/TextListValue-generated.h |
133 | 132 | ||
134 | 133 | ||
135 | # plugins/ldap/resourceldap.h \ | 134 | # plugins/ldap/resourceldap.h \ |
136 | # plugins/ldap/resourceldapconfig.h \ | 135 | # plugins/ldap/resourceldapconfig.h \ |
136 | #formats/binary/binaryformat.h \ | ||
137 | 137 | ||
138 | 138 | ||
139 | SOURCES = \ | 139 | SOURCES = \ |
140 | distributionlist.cpp \ | 140 | distributionlist.cpp \ |
141 | distributionlistdialog.cpp \ | 141 | distributionlistdialog.cpp \ |
142 | distributionlisteditor.cpp \ | 142 | distributionlisteditor.cpp \ |
143 | vcardformatplugin.cpp \ | 143 | vcardformatplugin.cpp \ |
144 | formats/binaryformat.cpp \ | ||
145 | formats/vcardformatplugin2.cpp \ | 144 | formats/vcardformatplugin2.cpp \ |
146 | formatfactory.cpp \ | 145 | formatfactory.cpp \ |
147 | resource.cpp \ | 146 | resource.cpp \ |
148 | stdaddressbook.cpp \ | 147 | stdaddressbook.cpp \ |
149 | plugin.cpp \ | 148 | plugin.cpp \ |
150 | agent.cpp \ | 149 | agent.cpp \ |
151 | geo.cpp \ | 150 | geo.cpp \ |
152 | key.cpp \ | 151 | key.cpp \ |
153 | field.cpp \ | 152 | field.cpp \ |
154 | address.cpp \ | 153 | address.cpp \ |
155 | phonenumber.cpp \ | 154 | phonenumber.cpp \ |
156 | picture.cpp \ | 155 | picture.cpp \ |
@@ -203,12 +202,13 @@ vcard/AgentValue.cpp \ | |||
203 | vcard/TelValue.cpp \ | 202 | vcard/TelValue.cpp \ |
204 | vcard/TextBinValue.cpp \ | 203 | vcard/TextBinValue.cpp \ |
205 | vcard/OrgValue.cpp \ | 204 | vcard/OrgValue.cpp \ |
206 | vcard/UTCValue.cpp \ | 205 | vcard/UTCValue.cpp \ |
207 | vcard/ClassValue.cpp \ | 206 | vcard/ClassValue.cpp \ |
208 | vcard/FloatValue.cpp \ | 207 | vcard/FloatValue.cpp \ |
209 | vcard/TextListValue.cpp | 208 | vcard/TextListValue.cpp |
210 | 209 | ||
211 | 210 | ||
212 | # plugins/ldap/resourceldap.cpp \ | 211 | # plugins/ldap/resourceldap.cpp \ |
213 | # plugins/ldap/resourceldapconfig.cpp \ | 212 | # plugins/ldap/resourceldapconfig.cpp \ |
214 | 213 | ||
214 | #formats/binary/binaryformat.cpp \ | ||
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro new file mode 100644 index 0000000..3db201f --- a/dev/null +++ b/kabc/plugins/dir/dir.pro | |||
@@ -0,0 +1,29 @@ | |||
1 | TEMPLATE= lib | ||
2 | CONFIG += qt warn_on release | ||
3 | #release debug | ||
4 | |||
5 | TARGET = microkabc_dir | ||
6 | INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat | ||
7 | DESTDIR = ../../../bin | ||
8 | #LIBS += -lmicrokde -lmicrokabc | ||
9 | #LIBS += -L$(QPEDIR)/lib | ||
10 | |||
11 | INTERFACES = \ | ||
12 | |||
13 | HEADERS = \ | ||
14 | resourcedir.h \ | ||
15 | resourcedirconfig.h | ||
16 | |||
17 | SOURCES = \ | ||
18 | resourcedir.cpp \ | ||
19 | resourcedirconfig.cpp | ||
20 | |||
21 | unix : { | ||
22 | OBJECTS_DIR = obj/unix | ||
23 | MOC_DIR = moc/unix | ||
24 | } | ||
25 | win32: { | ||
26 | DEFINES += _WIN32_ | ||
27 | OBJECTS_DIR = obj/win | ||
28 | MOC_DIR = moc/win | ||
29 | } \ No newline at end of file | ||
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index be19821..6ea2f4b 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -251,27 +251,29 @@ bool ResourceDir::lock( const QString &path ) | |||
251 | url = lockUniqueName; | 251 | url = lockUniqueName; |
252 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); | 252 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); |
253 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); | 253 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); |
254 | 254 | ||
255 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; | 255 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; |
256 | 256 | ||
257 | // Create unique file | 257 | // Create unique file |
258 | QFile file( mLockUniqueName ); | 258 | QFile file( mLockUniqueName ); |
259 | file.open( IO_WriteOnly ); | 259 | file.open( IO_WriteOnly ); |
260 | file.close(); | 260 | file.close(); |
261 | 261 | ||
262 | // Create lock file | 262 | // Create lock file |
263 | int result = ::link( QFile::encodeName( mLockUniqueName ), | 263 | int result = 0; |
264 | #ifndef _WIN32_ | ||
265 | result = ::link( QFile::encodeName( mLockUniqueName ), | ||
264 | QFile::encodeName( lockName ) ); | 266 | QFile::encodeName( lockName ) ); |
265 | 267 | #endif | |
266 | if ( result == 0 ) { | 268 | if ( result == 0 ) { |
267 | addressBook()->emitAddressBookLocked(); | 269 | addressBook()->emitAddressBookLocked(); |
268 | return true; | 270 | return true; |
269 | } | 271 | } |
270 | 272 | ||
271 | // TODO: check stat | 273 | // TODO: check stat |
272 | 274 | ||
273 | return false; | 275 | return false; |
274 | } | 276 | } |
275 | 277 | ||
276 | void ResourceDir::unlock( const QString &path ) | 278 | void ResourceDir::unlock( const QString &path ) |
277 | { | 279 | { |
diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro new file mode 100644 index 0000000..a5ade93 --- a/dev/null +++ b/kabc/plugins/file/file.pro | |||
@@ -0,0 +1,30 @@ | |||
1 | TEMPLATE= lib | ||
2 | CONFIG += qt warn_on release | ||
3 | #release debug | ||
4 | |||
5 | TARGET = microkabc_file | ||
6 | INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat | ||
7 | |||
8 | DESTDIR = ../../../bin | ||
9 | #LIBS += -lmicrokde -lmicrokabc | ||
10 | #LIBS += -L$(QPEDIR)/lib | ||
11 | |||
12 | INTERFACES = \ | ||
13 | |||
14 | HEADERS = \ | ||
15 | resourcefile.h \ | ||
16 | resourcefileconfig.h | ||
17 | |||
18 | SOURCES = \ | ||
19 | resourcefile.cpp \ | ||
20 | resourcefileconfig.cpp | ||
21 | |||
22 | unix : { | ||
23 | OBJECTS_DIR = obj/unix | ||
24 | MOC_DIR = moc/unix | ||
25 | } | ||
26 | win32: { | ||
27 | DEFINES += _WIN32_ | ||
28 | OBJECTS_DIR = obj/win | ||
29 | MOC_DIR = moc/win | ||
30 | } \ No newline at end of file | ||
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 3920f69..4b4c935 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -277,27 +277,29 @@ bool ResourceFile::lock( const QString &fileName ) | |||
277 | 277 | ||
278 | url = lockUniqueName; | 278 | url = lockUniqueName; |
279 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); | 279 | //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); |
280 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); | 280 | mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); |
281 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; | 281 | kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; |
282 | 282 | ||
283 | // Create unique file | 283 | // Create unique file |
284 | QFile file( mLockUniqueName ); | 284 | QFile file( mLockUniqueName ); |
285 | file.open( IO_WriteOnly ); | 285 | file.open( IO_WriteOnly ); |
286 | file.close(); | 286 | file.close(); |
287 | 287 | ||
288 | // Create lock file | 288 | // Create lock file |
289 | int result = ::link( QFile::encodeName( mLockUniqueName ), | 289 | int result = 0; |
290 | #ifndef _WIN32_ | ||
291 | result = ::link( QFile::encodeName( mLockUniqueName ), | ||
290 | QFile::encodeName( lockName ) ); | 292 | QFile::encodeName( lockName ) ); |
291 | 293 | #endif | |
292 | if ( result == 0 ) { | 294 | if ( result == 0 ) { |
293 | addressBook()->emitAddressBookLocked(); | 295 | addressBook()->emitAddressBookLocked(); |
294 | return true; | 296 | return true; |
295 | } | 297 | } |
296 | 298 | ||
297 | // TODO: check stat | 299 | // TODO: check stat |
298 | 300 | ||
299 | return false; | 301 | return false; |
300 | } | 302 | } |
301 | 303 | ||
302 | void ResourceFile::unlock( const QString &fileName ) | 304 | void ResourceFile::unlock( const QString &fileName ) |
303 | { | 305 | { |