summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file/resourcefile.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/file/resourcefile.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index d98efc8..da2e4d7 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -68,3 +68,3 @@ __declspec(dllexport)
68 { 68 {
69 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidget>(); 69 return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidgetContainer>();
70 } 70 }
@@ -77,3 +77,8 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable )
77{ 77{
78 QString fileName, formatName; 78 QString fileName, formatName, default_fileName;
79
80 if (syncable == true)
81 default_fileName = "/home/polo/kdepim/apps/kabc/localfile.vcf";
82 else
83 default_fileName = StdAddressBook::fileName();
79 84
@@ -81,9 +86,7 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable )
81 if ( cfg ) { 86 if ( cfg ) {
82 fileName = cfg->readEntry( "FileName", StdAddressBook::fileName() ); 87 fileName = cfg->readEntry( "FileName", default_fileName );
83 formatName = cfg->readEntry( "FileFormat", "vcard" ); 88 formatName = cfg->readEntry( "FileFormat", "vcard" );
84// qDebug("ResourceFile::ResourceFile : 1 %s, %s", fileName.latin1(), formatName.latin1() );
85 } else { 89 } else {
86 fileName = StdAddressBook::fileName(); 90 fileName = default_fileName;
87 formatName = "vcard"; 91 formatName = "vcard";
88// qDebug("ResourceFile::ResourceFile : 2 %s, %s", fileName.latin1(), formatName.latin1() );
89 } 92 }
@@ -113,15 +116,2 @@ void ResourceFile::init( const QString &fileName, const QString &formatName )
113 116
114/*US
115//US qDebug("ResourceFile::init initialized with format %s ", formatName.latin1());
116 if (mFormatName == "vcard") {
117 mFormat = new VCardFormatPlugin2();
118// qDebug("ResourceFile::init format VCardFormatPlugin2");
119 }
120 else if (mFormatName == "binary") {
121 mFormat = new BinaryFormat();
122// qDebug("ResourceFile::init format BinaryFormat");
123 }
124 else
125 qDebug("ResourceFile::init format unknown !!! %s ", formatName.latin1());
126*/
127 117