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/plugins/file | |
parent | 13d88c91f2916090bd45e23b504d0b665c68126f (diff) | |
download | kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.zip kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.gz kdepimpi-56721aac86c9ae5253abac8962474c8d1a7e648a.tar.bz2 |
Changes for compiling on desktop
-rw-r--r-- | kabc/plugins/file/file.pro | 30 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 6 |
2 files changed, 34 insertions, 2 deletions
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 | |||
@@ -286,9 +286,11 @@ bool ResourceFile::lock( const QString &fileName ) | |||
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; |