author | ulf69 <ulf69> | 2004-06-29 05:24:46 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-06-29 05:24:46 (UTC) |
commit | a027e7c5a476dbc101431ab8bf7987ba5d44d969 (patch) (unidiff) | |
tree | 5e87c8df91cf17f2442e519677456dc731b13445 /kabc | |
parent | 5b8c654346bbbb32df6bf29065bff76c99de1653 (diff) | |
download | kdepimpi-a027e7c5a476dbc101431ab8bf7987ba5d44d969.zip kdepimpi-a027e7c5a476dbc101431ab8bf7987ba5d44d969.tar.gz kdepimpi-a027e7c5a476dbc101431ab8bf7987ba5d44d969.tar.bz2 |
removed references to KAB_EMBEDDED macro
-rw-r--r-- | kabc/distributionlist.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp index aa2725d..45b9dda 100644 --- a/kabc/distributionlist.cpp +++ b/kabc/distributionlist.cpp | |||
@@ -162,10 +162,9 @@ QStringList DistributionListManager::listNames() | |||
162 | bool DistributionListManager::load() | 162 | bool DistributionListManager::load() |
163 | { | 163 | { |
164 | KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); | 164 | KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) ); |
165 | 165 | ||
166 | #ifndef KAB_EMBEDDED | 166 | /*US |
167 | |||
168 | QMap<QString,QString> entryMap = cfg.entryMap( mAddressBook->identifier() ); | 167 | QMap<QString,QString> entryMap = cfg.entryMap( mAddressBook->identifier() ); |
169 | if ( entryMap.isEmpty() ) { | 168 | if ( entryMap.isEmpty() ) { |
170 | kdDebug(5700) << "No distlists for '" << mAddressBook->identifier() << "'" << endl; | 169 | kdDebug(5700) << "No distlists for '" << mAddressBook->identifier() << "'" << endl; |
171 | return false; | 170 | return false; |
@@ -175,10 +174,9 @@ bool DistributionListManager::load() | |||
175 | 174 | ||
176 | QMap<QString,QString>::ConstIterator it; | 175 | QMap<QString,QString>::ConstIterator it; |
177 | for( it = entryMap.begin(); it != entryMap.end(); ++it ) { | 176 | for( it = entryMap.begin(); it != entryMap.end(); ++it ) { |
178 | QString name = it.key(); | 177 | QString name = it.key(); |
179 | 178 | */ | |
180 | #else //KAB_EMBEDDED | ||
181 | cfg.setGroup( mAddressBook->identifier() ); | 179 | cfg.setGroup( mAddressBook->identifier() ); |
182 | //US we work in microkde with a list of distributionlists | 180 | //US we work in microkde with a list of distributionlists |
183 | QStringList distlists = cfg.readListEntry( "Lists" ); | 181 | QStringList distlists = cfg.readListEntry( "Lists" ); |
184 | if ( distlists.isEmpty() ) { | 182 | if ( distlists.isEmpty() ) { |
@@ -189,9 +187,8 @@ bool DistributionListManager::load() | |||
189 | QStringList::ConstIterator it; | 187 | QStringList::ConstIterator it; |
190 | for( it = distlists.begin(); it != distlists.end(); ++it ) { | 188 | for( it = distlists.begin(); it != distlists.end(); ++it ) { |
191 | QString name = *it; | 189 | QString name = *it; |
192 | 190 | ||
193 | #endif //KAB_EMBEDDED | ||
194 | 191 | ||
195 | QStringList value = cfg.readListEntry( name ); | 192 | QStringList value = cfg.readListEntry( name ); |
196 | 193 | ||
197 | kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; | 194 | kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; |
@@ -239,19 +236,21 @@ bool DistributionListManager::save() | |||
239 | } | 236 | } |
240 | cfg.writeEntry( list->name(), value ); | 237 | cfg.writeEntry( list->name(), value ); |
241 | } | 238 | } |
242 | 239 | ||
243 | #ifdef KAB_EMBEDDED | ||
244 | //US for microKDE we have not yet sophisticated methods to load maps. | 240 | //US for microKDE we have not yet sophisticated methods to load maps. |
245 | // Because of that we store also a list of all distributionlists. | 241 | // Because of that we store also a list of all distributionlists. |
246 | QStringList namelist; | 242 | QStringList namelist; |
247 | for( list = mLists.first(); list; list = mLists.next() ) { | 243 | for( list = mLists.first(); list; list = mLists.next() ) { |
248 | namelist.append( list->name() ); | 244 | namelist.append( list->name() ); |
249 | } | 245 | } |
250 | cfg.writeEntry( "Lists", namelist ); | 246 | cfg.writeEntry( "Lists", namelist ); |
251 | 247 | ||
252 | #endif //KAB_EMBEDDED | 248 | |
253 | 249 | ||
250 | |||
251 | |||
252 | |||
254 | cfg.sync(); | 253 | cfg.sync(); |
255 | 254 | ||
256 | return true; | 255 | return true; |
257 | } | 256 | } |
@@ -260,23 +259,23 @@ DistributionListWatcher* DistributionListWatcher::mSelf = 0; | |||
260 | 259 | ||
261 | DistributionListWatcher::DistributionListWatcher() | 260 | DistributionListWatcher::DistributionListWatcher() |
262 | : QObject( 0, "DistributionListWatcher" ) | 261 | : QObject( 0, "DistributionListWatcher" ) |
263 | { | 262 | { |
264 | #ifndef KAB_EMBEDDED | 263 | /*US |
265 | mDirWatch = new KDirWatch; | 264 | mDirWatch = new KDirWatch; |
266 | mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) ); | 265 | mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) ); |
267 | 266 | ||
268 | connect( mDirWatch, SIGNAL( dirty( const QString& ) ), SIGNAL( changed() ) ); | 267 | connect( mDirWatch, SIGNAL( dirty( const QString& ) ), SIGNAL( changed() ) ); |
269 | mDirWatch->startScan(); | 268 | mDirWatch->startScan(); |
270 | #endif //KAB_EMBEDDED | 269 | */ |
271 | } | 270 | } |
272 | 271 | ||
273 | DistributionListWatcher::~DistributionListWatcher() | 272 | DistributionListWatcher::~DistributionListWatcher() |
274 | { | 273 | { |
275 | #ifndef KAB_EMBEDDED | 274 | /*US |
276 | delete mDirWatch; | 275 | delete mDirWatch; |
277 | mDirWatch = 0; | 276 | mDirWatch = 0; |
278 | #endif //KAB_EMBEDDED | 277 | */ |
279 | } | 278 | } |
280 | 279 | ||
281 | DistributionListWatcher *DistributionListWatcher::self() | 280 | DistributionListWatcher *DistributionListWatcher::self() |
282 | { | 281 | { |
@@ -285,9 +284,6 @@ DistributionListWatcher *DistributionListWatcher::self() | |||
285 | 284 | ||
286 | return mSelf; | 285 | return mSelf; |
287 | } | 286 | } |
288 | 287 | ||
289 | 288 | //US #include "distributionlist.moc" | |
290 | #ifndef KAB_EMBEDDED | ||
291 | #include "distributionlist.moc" | ||
292 | #endif //KAB_EMBEDDED | ||
293 | 289 | ||