-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 28 | ||||
-rw-r--r-- | kabc/plugins/ldap/resourceldap.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 2 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 2 |
6 files changed, 14 insertions, 24 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 29f1e3a..eccd482 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -68,13 +68,13 @@ __declspec(dllexport) | |||
68 | { | 68 | { |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | //US void *init_kabc_dir() | 71 | //US void *init_kabc_dir() |
72 | void *init_microkabc_dir() | 72 | void *init_microkabc_dir() |
73 | { | 73 | { |
74 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, SyncPrefWidget>(); | 74 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, SyncPrefWidgetContainer>(); |
75 | } | 75 | } |
76 | #ifndef _WIN32_ | 76 | #ifndef _WIN32_ |
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | ResourceDir::ResourceDir( const KConfig *config, bool syncable ) | 80 | ResourceDir::ResourceDir( const KConfig *config, bool syncable ) |
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 | |||
@@ -63,32 +63,35 @@ __declspec(dllexport) | |||
63 | { | 63 | { |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | //US void *init_kabc_file() | 66 | //US void *init_kabc_file() |
67 | void *init_microkabc_file() | 67 | void *init_microkabc_file() |
68 | { | 68 | { |
69 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidget>(); | 69 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidgetContainer>(); |
70 | } | 70 | } |
71 | #ifndef _WIN32_ | 71 | #ifndef _WIN32_ |
72 | } | 72 | } |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | ResourceFile::ResourceFile( const KConfig *config, bool syncable ) | 75 | ResourceFile::ResourceFile( const KConfig *config, bool syncable ) |
76 | : Resource( config, syncable ) , mFormat( 0 ) | 76 | : Resource( config, syncable ) , mFormat( 0 ) |
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 | ||
80 | KConfig *cfg = (KConfig *)config; | 85 | KConfig *cfg = (KConfig *)config; |
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 | } |
90 | 93 | ||
91 | init( fileName, formatName ); | 94 | init( fileName, formatName ); |
92 | } | 95 | } |
93 | 96 | ||
94 | ResourceFile::ResourceFile( const QString &fileName, bool syncable , | 97 | ResourceFile::ResourceFile( const QString &fileName, bool syncable , |
@@ -108,25 +111,12 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) | |||
108 | 111 | ||
109 | if ( !mFormat ) { | 112 | if ( !mFormat ) { |
110 | mFormatName = "vcard"; | 113 | mFormatName = "vcard"; |
111 | mFormat = factory->format( mFormatName ); | 114 | mFormat = factory->format( mFormatName ); |
112 | } | 115 | } |
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 | ||
128 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); | 118 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); |
129 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); | 119 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); |
130 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); | 120 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); |
131 | 121 | ||
132 | setFileName( fileName ); | 122 | setFileName( fileName ); |
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp index 198e80a..17f115d 100644 --- a/kabc/plugins/ldap/resourceldap.cpp +++ b/kabc/plugins/ldap/resourceldap.cpp | |||
@@ -42,13 +42,13 @@ using namespace KABC; | |||
42 | 42 | ||
43 | extern "C" | 43 | extern "C" |
44 | { | 44 | { |
45 | //US void *init_kabc_ldap() | 45 | //US void *init_kabc_ldap() |
46 | void *init_microkabc_ldap() | 46 | void *init_microkabc_ldap() |
47 | { | 47 | { |
48 | return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidget>(); | 48 | return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidgetContainer>(); |
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); | 52 | void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); |
53 | 53 | ||
54 | 54 | ||
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index 9dfd473..4b811e9 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp | |||
@@ -58,13 +58,13 @@ $Id$ | |||
58 | 58 | ||
59 | using namespace KABC; | 59 | using namespace KABC; |
60 | extern "C" | 60 | extern "C" |
61 | { | 61 | { |
62 | void *init_microkabc_opie() | 62 | void *init_microkabc_opie() |
63 | { | 63 | { |
64 | return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidget>(); | 64 | return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidgetContainer>(); |
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) | 68 | ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) |
69 | : Resource( config, syncable ), mAccess(0), mConverter (0) | 69 | : Resource( config, syncable ), mAccess(0), mConverter (0) |
70 | { | 70 | { |
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp index 5565580..93a4d33 100644 --- a/kabc/plugins/qtopia/resourceqtopia.cpp +++ b/kabc/plugins/qtopia/resourceqtopia.cpp | |||
@@ -55,13 +55,13 @@ $Id$ | |||
55 | 55 | ||
56 | using namespace KABC; | 56 | using namespace KABC; |
57 | extern "C" | 57 | extern "C" |
58 | { | 58 | { |
59 | void *init_microkabc_qtopia() | 59 | void *init_microkabc_qtopia() |
60 | { | 60 | { |
61 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig, SyncPrefWidget>(); | 61 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig, SyncPrefWidgetContainer>(); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable ) | 65 | ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable ) |
66 | : Resource( config, syncable ), mConverter (0) | 66 | : Resource( config, syncable ), mConverter (0) |
67 | { | 67 | { |
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index 70c3718..b63df0c 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp | |||
@@ -57,13 +57,13 @@ $Id$ | |||
57 | 57 | ||
58 | using namespace KABC; | 58 | using namespace KABC; |
59 | extern "C" | 59 | extern "C" |
60 | { | 60 | { |
61 | void *init_microkabc_sharpdtm() | 61 | void *init_microkabc_sharpdtm() |
62 | { | 62 | { |
63 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig,SyncPrefWidget>(); | 63 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig,SyncPrefWidgetContainer>(); |
64 | } | 64 | } |
65 | } | 65 | } |
66 | 66 | ||
67 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable ) | 67 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable ) |
68 | : Resource( config, syncable ), mConverter (0) | 68 | : Resource( config, syncable ), mConverter (0) |
69 | { | 69 | { |