From 56721aac86c9ae5253abac8962474c8d1a7e648a Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 07 Jul 2004 11:56:39 +0000 Subject: Changes for compiling on desktop --- (limited to 'kabc/plugins/file') 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 @@ +TEMPLATE = lib +CONFIG += qt warn_on release +#release debug + +TARGET = microkabc_file +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat + +DESTDIR = ../../../bin +#LIBS += -lmicrokde -lmicrokabc +#LIBS += -L$(QPEDIR)/lib + +INTERFACES = \ + +HEADERS = \ + resourcefile.h \ + resourcefileconfig.h + +SOURCES = \ + resourcefile.cpp \ + resourcefileconfig.cpp + +unix : { +OBJECTS_DIR = obj/unix +MOC_DIR = moc/unix +} +win32: { +DEFINES += _WIN32_ +OBJECTS_DIR = obj/win +MOC_DIR = moc/win +} \ 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 ) file.close(); // Create lock file - int result = ::link( QFile::encodeName( mLockUniqueName ), + int result = 0; +#ifndef _WIN32_ + result = ::link( QFile::encodeName( mLockUniqueName ), QFile::encodeName( lockName ) ); - +#endif if ( result == 0 ) { addressBook()->emitAddressBookLocked(); return true; -- cgit v0.9.0.2