Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index d30ed2f..80af841 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -44,5 +44,5 @@ $Id$ #include <kstandarddirs.h> -//US #include "formatfactory.h" +#include "formatfactory.h" #include "resource.h" @@ -50,6 +50,6 @@ $Id$ #include "stdaddressbook.h" -#include <formats/vcardformatplugin2.h> -#include <formats/binaryformat.h> +//US #include "../../formats/vcardformatplugin2.h" +//US #include "../../formats/binaryformat.h" @@ -60,9 +60,8 @@ using namespace KABC; extern "C" { - void *init_kabc_file() +//US void *init_kabc_file() + void *init_microkabc_file() { - qDebug("!!!resourcefile.cpp : init_kabc_file has to be changed"); -//US return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); - return 0; + return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); } } @@ -100,6 +99,6 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) mFormatName = formatName; -/*US FormatFactory *factory = FormatFactory::self(); - mFormat = factory->format( mFormatName ); + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); if ( !mFormat ) { @@ -107,6 +106,6 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) mFormat = factory->format( mFormatName ); } -*/ +/*US //US qDebug("ResourceFile::init initialized with format %s ", formatName.latin1()); if (mFormatName == "vcard") { @@ -120,4 +119,5 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) else qDebug("ResourceFile::init format unknown !!! %s ", formatName.latin1()); +*/ /*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods @@ -218,6 +218,6 @@ bool ResourceFile::save( Ticket *ticket ) /*US we use a simpler method to create a backupfile - (void) KSaveFile::backupFile( mFileName, QString::null /*directory*/ -/*US ,extension ); + (void) KSaveFile::backupFile( mFileName, QString::null + ,extension ); KSaveFile saveFile( mFileName ); @@ -287,7 +287,6 @@ bool ResourceFile::lock( const QString &fileName ) // Create lock file - int result = 0;//::link( QFile::encodeName( mLockUniqueName ), - // QFile::encodeName( lockName ) ); - qDebug("lock files %s, %s needs to be fixed", mLockUniqueName.latin1(), lockName.latin1() ); + int result = ::link( QFile::encodeName( mLockUniqueName ), + QFile::encodeName( lockName ) ); if ( result == 0 ) { @@ -343,7 +342,7 @@ void ResourceFile::setFormat( const QString &format ) delete mFormat; -//US FormatFactory *factory = FormatFactory::self(); -//US mFormat = factory->format( mFormatName ); - + FormatFactory *factory = FormatFactory::self(); + mFormat = factory->format( mFormatName ); +/*US //qDebug("ResourceFile::setFormat initialized with format %s ", format.latin1()); if (mFormatName == "vcard") { @@ -357,4 +356,5 @@ void ResourceFile::setFormat( const QString &format ) else qDebug("ResourceFile::setFormat format unknown !!! %s ", format.latin1()); +*/ } |