-rw-r--r-- | kabc/addressbook.cpp | 2 | ||||
-rw-r--r-- | kabc/kabcE.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 7 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.h | 2 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 16 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.h | 4 | ||||
-rw-r--r-- | kabc/plugins/ldap/resourceldap.cpp | 7 | ||||
-rw-r--r-- | kabc/plugins/ldap/resourceldap.h | 2 | ||||
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 11 | ||||
-rw-r--r-- | kabc/plugins/opie/resourceopie.h | 4 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 11 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.h | 4 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 8 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.h | 4 | ||||
-rw-r--r-- | kabc/resource.cpp | 32 | ||||
-rw-r--r-- | kabc/resource.h | 16 |
16 files changed, 39 insertions, 93 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 592d78d..c584c35 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -279,3 +279,3 @@ void AddressBook::init(const QString &config, const QString &family ) | |||
279 | //US d->mErrorHandler = 0; | 279 | //US d->mErrorHandler = 0; |
280 | d->mManager = new KRES::Manager<Resource>( fami, false ); | 280 | d->mManager = new KRES::Manager<Resource>( fami ); |
281 | d->mManager->readConfig( d->mConfig ); | 281 | d->mManager->readConfig( d->mConfig ); |
diff --git a/kabc/kabcE.pro b/kabc/kabcE.pro index 061909b..96fe39e 100644 --- a/kabc/kabcE.pro +++ b/kabc/kabcE.pro | |||
@@ -43,3 +43,2 @@ HEADERS = \ | |||
43 | stdaddressbook.h \ | 43 | stdaddressbook.h \ |
44 | syncprefwidget.h \ | ||
45 | timezone.h \ | 44 | timezone.h \ |
@@ -148,3 +147,2 @@ SOURCES = \ | |||
148 | stdaddressbook.cpp \ | 147 | stdaddressbook.cpp \ |
149 | syncprefwidget.cpp \ | ||
150 | timezone.cpp \ | 148 | timezone.cpp \ |
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index e58e4f7..e2b7b08 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp | |||
@@ -60,3 +60,2 @@ $Id$ | |||
60 | #include "resourcedir.h" | 60 | #include "resourcedir.h" |
61 | #include "syncprefwidget.h" | ||
62 | 61 | ||
@@ -76,3 +75,3 @@ __declspec(dllexport) | |||
76 | { | 75 | { |
77 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, SyncPrefWidgetContainer>(); | 76 | return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>(); |
78 | } | 77 | } |
@@ -82,4 +81,4 @@ __declspec(dllexport) | |||
82 | 81 | ||
83 | ResourceDir::ResourceDir( const KConfig *config, bool syncable ) | 82 | ResourceDir::ResourceDir( const KConfig *config ) |
84 | : Resource( config, syncable ) | 83 | : Resource( config ) |
85 | { | 84 | { |
diff --git a/kabc/plugins/dir/resourcedir.h b/kabc/plugins/dir/resourcedir.h index 77cd18c..6c1e922 100644 --- a/kabc/plugins/dir/resourcedir.h +++ b/kabc/plugins/dir/resourcedir.h | |||
@@ -51,3 +51,3 @@ class ResourceDir : public Resource | |||
51 | public: | 51 | public: |
52 | ResourceDir( const KConfig*, bool syncable ); | 52 | ResourceDir( const KConfig* ); |
53 | ~ResourceDir(); | 53 | ~ResourceDir(); |
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 163f2b4..dc5932f 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp | |||
@@ -53,3 +53,2 @@ $Id$ | |||
53 | #include "resourcefile.h" | 53 | #include "resourcefile.h" |
54 | #include "syncprefwidget.h" | ||
55 | 54 | ||
@@ -71,3 +70,3 @@ __declspec(dllexport) | |||
71 | { | 70 | { |
72 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig, SyncPrefWidgetContainer>(); | 71 | return new KRES::PluginFactory<ResourceFile,ResourceFileConfig>(); |
73 | } | 72 | } |
@@ -77,4 +76,4 @@ __declspec(dllexport) | |||
77 | 76 | ||
78 | ResourceFile::ResourceFile( const KConfig *config, bool syncable ) | 77 | ResourceFile::ResourceFile( const KConfig *config ) |
79 | : Resource( config, syncable ) , mFormat( 0 ) | 78 | : Resource( config ) , mFormat( 0 ) |
80 | { | 79 | { |
@@ -82,6 +81,3 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable ) | |||
82 | 81 | ||
83 | if (syncable == true) | 82 | default_fileName = StdAddressBook::fileName(); |
84 | default_fileName = "/home/polo/kdepim/apps/kabc/localfile.vcf"; | ||
85 | else | ||
86 | default_fileName = StdAddressBook::fileName(); | ||
87 | 83 | ||
@@ -99,5 +95,5 @@ ResourceFile::ResourceFile( const KConfig *config, bool syncable ) | |||
99 | 95 | ||
100 | ResourceFile::ResourceFile( const QString &fileName, bool syncable , | 96 | ResourceFile::ResourceFile( const QString &fileName , |
101 | const QString &formatName ) | 97 | const QString &formatName ) |
102 | : Resource( 0, syncable ) | 98 | : Resource( 0 ) |
103 | { | 99 | { |
diff --git a/kabc/plugins/file/resourcefile.h b/kabc/plugins/file/resourcefile.h index 8339340..b4421b2 100644 --- a/kabc/plugins/file/resourcefile.h +++ b/kabc/plugins/file/resourcefile.h | |||
@@ -60,3 +60,3 @@ public: | |||
60 | */ | 60 | */ |
61 | ResourceFile( const KConfig *cfg, bool syncable ); | 61 | ResourceFile( const KConfig *cfg ); |
62 | 62 | ||
@@ -65,3 +65,3 @@ public: | |||
65 | */ | 65 | */ |
66 | ResourceFile( const QString &fileName, bool syncable , const QString &formatName = "vcard" ); | 66 | ResourceFile( const QString &fileName , const QString &formatName = "vcard" ); |
67 | 67 | ||
diff --git a/kabc/plugins/ldap/resourceldap.cpp b/kabc/plugins/ldap/resourceldap.cpp index 17f115d..55c43af 100644 --- a/kabc/plugins/ldap/resourceldap.cpp +++ b/kabc/plugins/ldap/resourceldap.cpp | |||
@@ -38,3 +38,2 @@ $Id$ | |||
38 | #include "resourceldapconfig.h" | 38 | #include "resourceldapconfig.h" |
39 | #include "syncprefwidget.h" | ||
40 | 39 | ||
@@ -47,3 +46,3 @@ extern "C" | |||
47 | { | 46 | { |
48 | return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig, SyncPrefWidgetContainer>(); | 47 | return new KRES::PluginFactory<ResourceLDAP,ResourceLDAPConfig>(); |
49 | } | 48 | } |
@@ -54,4 +53,4 @@ void addModOp( LDAPMod ***pmods, const QString &attr, const QString &value ); | |||
54 | 53 | ||
55 | ResourceLDAP::ResourceLDAP( const KConfig *config, bool syncable ) | 54 | ResourceLDAP::ResourceLDAP( const KConfig *config ) |
56 | : Resource( config, syncable ), mPort( 389 ), mLdap( 0 ) | 55 | : Resource( config ), mPort( 389 ), mLdap( 0 ) |
57 | { | 56 | { |
diff --git a/kabc/plugins/ldap/resourceldap.h b/kabc/plugins/ldap/resourceldap.h index 0aad3c1..0625f30 100644 --- a/kabc/plugins/ldap/resourceldap.h +++ b/kabc/plugins/ldap/resourceldap.h | |||
@@ -45,3 +45,3 @@ public: | |||
45 | 45 | ||
46 | ResourceLDAP( const KConfig*, bool syncable ); | 46 | ResourceLDAP( const KConfig* ); |
47 | 47 | ||
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index 22237dc..f610b38 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp | |||
@@ -52,3 +52,2 @@ $Id$ | |||
52 | #include "stdaddressbook.h" | 52 | #include "stdaddressbook.h" |
53 | #include "syncprefwidget.h" | ||
54 | 53 | ||
@@ -63,3 +62,3 @@ extern "C" | |||
63 | { | 62 | { |
64 | return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidgetContainer>(); | 63 | return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>(); |
65 | } | 64 | } |
@@ -67,4 +66,4 @@ extern "C" | |||
67 | 66 | ||
68 | ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) | 67 | ResourceOpie::ResourceOpie( const KConfig *config ) |
69 | : Resource( config, syncable ), mAccess(0), mConverter (0) | 68 | : Resource( config ), mAccess(0), mConverter (0) |
70 | { | 69 | { |
@@ -81,4 +80,4 @@ ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) | |||
81 | 80 | ||
82 | ResourceOpie::ResourceOpie( const QString &fileName, bool syncable ) | 81 | ResourceOpie::ResourceOpie( const QString &fileName ) |
83 | : Resource( 0, syncable ) | 82 | : Resource( 0 ) |
84 | { | 83 | { |
diff --git a/kabc/plugins/opie/resourceopie.h b/kabc/plugins/opie/resourceopie.h index d5b4ebd..9d05c70 100644 --- a/kabc/plugins/opie/resourceopie.h +++ b/kabc/plugins/opie/resourceopie.h | |||
@@ -59,3 +59,3 @@ public: | |||
59 | */ | 59 | */ |
60 | ResourceOpie( const KConfig *cfg, bool syncable ); | 60 | ResourceOpie( const KConfig *cfg ); |
61 | 61 | ||
@@ -64,3 +64,3 @@ public: | |||
64 | */ | 64 | */ |
65 | ResourceOpie( const QString &fileName, bool syncable ); | 65 | ResourceOpie( const QString &fileName ); |
66 | 66 | ||
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp index f9cabcb..deb218b 100644 --- a/kabc/plugins/qtopia/resourceqtopia.cpp +++ b/kabc/plugins/qtopia/resourceqtopia.cpp | |||
@@ -51,3 +51,2 @@ $Id$ | |||
51 | #include "qtopiaconverter.h" | 51 | #include "qtopiaconverter.h" |
52 | #include "syncprefwidget.h" | ||
53 | 52 | ||
@@ -60,3 +59,3 @@ extern "C" | |||
60 | { | 59 | { |
61 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig, SyncPrefWidgetContainer>(); | 60 | return new KRES::PluginFactory<ResourceQtopia,ResourceQtopiaConfig>(); |
62 | } | 61 | } |
@@ -64,4 +63,4 @@ extern "C" | |||
64 | 63 | ||
65 | ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable ) | 64 | ResourceQtopia::ResourceQtopia( const KConfig *config ) |
66 | : Resource( config, syncable ), mConverter (0) | 65 | : Resource( config ), mConverter (0) |
67 | { | 66 | { |
@@ -72,4 +71,4 @@ ResourceQtopia::ResourceQtopia( const KConfig *config, bool syncable ) | |||
72 | 71 | ||
73 | ResourceQtopia::ResourceQtopia( const QString &fileName, bool syncable ) | 72 | ResourceQtopia::ResourceQtopia( const QString &fileName ) |
74 | : Resource( 0, syncable ) | 73 | : Resource( 0 ) |
75 | { | 74 | { |
diff --git a/kabc/plugins/qtopia/resourceqtopia.h b/kabc/plugins/qtopia/resourceqtopia.h index eace280..ff6350d 100644 --- a/kabc/plugins/qtopia/resourceqtopia.h +++ b/kabc/plugins/qtopia/resourceqtopia.h | |||
@@ -60,3 +60,3 @@ public: | |||
60 | */ | 60 | */ |
61 | ResourceQtopia( const KConfig *cfg, bool syncable ); | 61 | ResourceQtopia( const KConfig *cfg ); |
62 | 62 | ||
@@ -65,3 +65,3 @@ public: | |||
65 | */ | 65 | */ |
66 | ResourceQtopia( const QString &fileName, bool syncable ); | 66 | ResourceQtopia( const QString &fileName ); |
67 | 67 | ||
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index c013f52..2cdf4bf 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp | |||
@@ -52,4 +52,2 @@ $Id$ | |||
52 | 52 | ||
53 | #include "syncprefwidget.h" | ||
54 | |||
55 | #include "stdaddressbook.h" | 53 | #include "stdaddressbook.h" |
@@ -63,3 +61,3 @@ extern "C" | |||
63 | { | 61 | { |
64 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig,SyncPrefWidgetContainer>(); | 62 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>(); |
65 | } | 63 | } |
@@ -67,4 +65,4 @@ extern "C" | |||
67 | 65 | ||
68 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config, bool syncable ) | 66 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config ) |
69 | : Resource( config, syncable ), mConverter (0) | 67 | : Resource( config ), mConverter (0) |
70 | { | 68 | { |
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.h b/kabc/plugins/sharpdtm/resourcesharpdtm.h index f386e69..64d06f9 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.h +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.h | |||
@@ -60,3 +60,3 @@ public: | |||
60 | */ | 60 | */ |
61 | ResourceSharpDTM( const KConfig *cfg, bool syncable ); | 61 | ResourceSharpDTM( const KConfig *cfg ); |
62 | 62 | ||
@@ -65,3 +65,3 @@ public: | |||
65 | */ | 65 | */ |
66 | ResourceSharpDTM( const QString &fileName, bool syncable ); | 66 | ResourceSharpDTM( const QString &fileName ); |
67 | 67 | ||
diff --git a/kabc/resource.cpp b/kabc/resource.cpp index 7b91239..267cdaf 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp | |||
@@ -29,4 +29,2 @@ $Id$ | |||
29 | 29 | ||
30 | #include <ksyncprofile.h> | ||
31 | |||
32 | #include "resource.h" | 30 | #include "resource.h" |
@@ -35,10 +33,5 @@ using namespace KABC; | |||
35 | 33 | ||
36 | Resource::Resource( const KConfig *config, bool syncable ) | 34 | Resource::Resource( const KConfig *config ) |
37 | : KRES::Resource( config ), mAddressBook( 0 ), mSyncProfile( 0 ) | 35 | : KRES::Resource( config ), mAddressBook( 0 ) |
38 | { | 36 | { |
39 | if(syncable == true) { | ||
40 | mSyncProfile = new KSyncProfile( ); | ||
41 | mSyncProfile->setName("pending" /*resourceName()*/); | ||
42 | mSyncProfile->readConfig( (KConfig *)config ); | ||
43 | } | ||
44 | } | 37 | } |
@@ -47,5 +40,2 @@ Resource::~Resource() | |||
47 | { | 40 | { |
48 | if (mSyncProfile != 0) { | ||
49 | delete mSyncProfile; | ||
50 | } | ||
51 | } | 41 | } |
@@ -55,5 +45,2 @@ void Resource::writeConfig( KConfig *config ) | |||
55 | KRES::Resource::writeConfig( config ); | 45 | KRES::Resource::writeConfig( config ); |
56 | |||
57 | if(mSyncProfile != 0) | ||
58 | mSyncProfile->writeConfig( config ); | ||
59 | } | 46 | } |
@@ -110,13 +97,2 @@ void Resource::cleanUp() | |||
110 | 97 | ||
111 | bool Resource::isSyncable() const | ||
112 | { | ||
113 | return (mSyncProfile != 0); | ||
114 | } | ||
115 | |||
116 | KSyncProfile* Resource::getSyncProfile() | ||
117 | { | ||
118 | return mSyncProfile; | ||
119 | } | ||
120 | |||
121 | |||
122 | QString Resource::fileName() const | 98 | QString Resource::fileName() const |
@@ -138,6 +114,2 @@ void Resource::setResourceName( const QString &name ) | |||
138 | KRES::Resource::setResourceName(name); | 114 | KRES::Resource::setResourceName(name); |
139 | if(mSyncProfile != 0) { | ||
140 | mSyncProfile->setName( name ); | ||
141 | } | ||
142 | |||
143 | } | 115 | } |
diff --git a/kabc/resource.h b/kabc/resource.h index 2024d2d..e5f0d5d 100644 --- a/kabc/resource.h +++ b/kabc/resource.h | |||
@@ -35,4 +35,2 @@ $Id$ | |||
35 | 35 | ||
36 | class KSyncProfile; | ||
37 | |||
38 | namespace KABC { | 36 | namespace KABC { |
@@ -62,8 +60,2 @@ class Resource : public KRES::Resource | |||
62 | { | 60 | { |
63 | private: | ||
64 | /** | ||
65 | * make this constructor private to force everybody to use the other one | ||
66 | */ | ||
67 | Resource( const KConfig *config); | ||
68 | |||
69 | public: | 61 | public: |
@@ -72,3 +64,3 @@ public: | |||
72 | */ | 64 | */ |
73 | Resource( const KConfig *config, bool syncable ); | 65 | Resource( const KConfig *config ); |
74 | 66 | ||
@@ -141,7 +133,2 @@ public: | |||
141 | 133 | ||
142 | |||
143 | virtual bool isSyncable() const; | ||
144 | |||
145 | virtual KSyncProfile* getSyncProfile(); | ||
146 | |||
147 | /** | 134 | /** |
@@ -160,3 +147,2 @@ private: | |||
160 | AddressBook *mAddressBook; | 147 | AddressBook *mAddressBook; |
161 | KSyncProfile *mSyncProfile; | ||
162 | QString mFileName; | 148 | QString mFileName; |