summaryrefslogtreecommitdiffabout
path: root/kabc
authorulf69 <ulf69>2004-07-02 15:38:16 (UTC)
committer ulf69 <ulf69>2004-07-02 15:38:16 (UTC)
commit30988fc010930d5c43ca7bc51ba64d57210c3985 (patch) (unidiff)
tree360ccd0055cb11d669f03baa350843e864746785 /kabc
parentead0dcba2c607297137e2b47418eb17864e0caaa (diff)
downloadkdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.zip
kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.gz
kdepimpi-30988fc010930d5c43ca7bc51ba64d57210c3985.tar.bz2
bugfix: choosen filenames where not used while import/export and for resources
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index f992301..a4f8d8a 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -1,394 +1,399 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <sys/types.h> 28#include <sys/types.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <unistd.h> 30#include <unistd.h>
31 31
32#include <qdir.h> 32#include <qdir.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qfileinfo.h> 34#include <qfileinfo.h>
35#include <qregexp.h> 35#include <qregexp.h>
36#include <qtimer.h> 36#include <qtimer.h>
37 37
38#include <kapplication.h> 38#include <kapplication.h>
39#include <kconfig.h> 39#include <kconfig.h>
40#include <kdebug.h> 40#include <kdebug.h>
41#include <klocale.h> 41#include <klocale.h>
42//US #include <ksavefile.h> 42//US #include <ksavefile.h>
43#include <kstandarddirs.h> 43#include <kstandarddirs.h>
44 44
45//US #include "formatfactory.h" 45//US #include "formatfactory.h"
46//US #include <qpe/qpeapplication.h> 46//US #include <qpe/qpeapplication.h>
47 47
48#include <opie/ocontactaccess.h> 48#include <opie/ocontactaccess.h>
49#include <opie/ocontactaccessbackend_xml.h>
49 50
50#include "resource.h" 51#include "resource.h"
51#include "resourceopieconfig.h" 52#include "resourceopieconfig.h"
52#include "stdaddressbook.h" 53#include "stdaddressbook.h"
53 54
54#include "opieconverter.h" 55#include "opieconverter.h"
55 56
56#include "resourceopie.h" 57#include "resourceopie.h"
57 58
58using namespace KABC; 59using namespace KABC;
59extern "C" 60extern "C"
60{ 61{
61 void *init_microkabc_opie() 62 void *init_microkabc_opie()
62 { 63 {
63 return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>(); 64 return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>();
64 } 65 }
65} 66}
66 67
67ResourceOpie::ResourceOpie( const KConfig *config ) 68ResourceOpie::ResourceOpie( const KConfig *config )
68 : Resource( config ), mConverter (0) 69 : Resource( config ), mConverter (0)
69{ 70{
70 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; 71 QString fileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
71 72
72 KConfig *cfg = (KConfig *)config; 73 KConfig *cfg = (KConfig *)config;
73 if ( cfg ) { 74 if ( cfg ) {
74 fileName = cfg->readEntry( "FileName", fileName ); 75 fileName = cfg->readEntry( "FileName", fileName );
75 76
76 } 77 }
77 78
78// qDebug("ResourceOpie::ResourceOpie : %s", fileName.latin1() ); 79// qDebug("ResourceOpie::ResourceOpie : %s", fileName.latin1() );
79 80
80 init( fileName ); 81 init( fileName );
81} 82}
82 83
83ResourceOpie::ResourceOpie( const QString &fileName ) 84ResourceOpie::ResourceOpie( const QString &fileName )
84 : Resource( 0 ) 85 : Resource( 0 )
85{ 86{
86// qDebug("ResourceOpie::ResourceOpie : 3 %s", fileName.latin1()); 87// qDebug("ResourceOpie::ResourceOpie : 3 %s", fileName.latin1());
87 init( fileName ); 88 init( fileName );
88} 89}
89 90
90void ResourceOpie::init( const QString &fileName ) 91void ResourceOpie::init( const QString &fileName )
91{ 92{
92 93
93/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods 94/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods
94 connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); 95 connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) );
95 connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); 96 connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) );
96 connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); 97 connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) );
97*/ 98*/
98 //US opie addressbook is always readonly 99 //US opie addressbook is always readonly
99 setReadOnly( true ); 100 setReadOnly( true );
100 101
101 setFileName( fileName ); 102 setFileName( fileName );
102 103
103} 104}
104 105
105ResourceOpie::~ResourceOpie() 106ResourceOpie::~ResourceOpie()
106{ 107{
107 if (mConverter != 0) 108 if (mConverter != 0)
108 delete mConverter; 109 delete mConverter;
109} 110}
110 111
111void ResourceOpie::writeConfig( KConfig *config ) 112void ResourceOpie::writeConfig( KConfig *config )
112{ 113{
113 //US opie addressbook is always readonly 114 //US opie addressbook is always readonly
114 setReadOnly( true ); 115 setReadOnly( true );
115 116
116 Resource::writeConfig( config ); 117 Resource::writeConfig( config );
117 118
118 config->writeEntry( "FileName", mFileName ); 119 config->writeEntry( "FileName", mFileName );
119 120
120// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); 121// qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1());
121 122
122} 123}
123 124
124Ticket *ResourceOpie::requestSaveTicket() 125Ticket *ResourceOpie::requestSaveTicket()
125{ 126{
126 kdDebug(5700) << "ResourceOpie::requestSaveTicket()" << endl; 127 kdDebug(5700) << "ResourceOpie::requestSaveTicket()" << endl;
127 128
128 if ( !addressBook() ) return 0; 129 if ( !addressBook() ) return 0;
129 130
130 if ( !lock( mFileName ) ) { 131 if ( !lock( mFileName ) ) {
131 kdDebug(5700) << "ResourceOpie::requestSaveTicket(): Unable to lock file '" 132 kdDebug(5700) << "ResourceOpie::requestSaveTicket(): Unable to lock file '"
132 << mFileName << "'" << endl; 133 << mFileName << "'" << endl;
133 return 0; 134 return 0;
134 } 135 }
135 return createTicket( this ); 136 return createTicket( this );
136} 137}
137 138
138 139
139bool ResourceOpie::doOpen() 140bool ResourceOpie::doOpen()
140{ 141{
141// qDebug("ResourceOpie::doOpen() %s", mFileName.latin1()); 142// qDebug("ResourceOpie::doOpen() %s", mFileName.latin1());
142/*US 143/*US
143 QFile file( mFileName ); 144 QFile file( mFileName );
144 145
145 if ( !file.exists() ) { 146 if ( !file.exists() ) {
146 // try to create the file 147 // try to create the file
147 bool ok = file.open( IO_WriteOnly ); 148 bool ok = file.open( IO_WriteOnly );
148 if ( ok ) 149 if ( ok )
149 file.close(); 150 file.close();
150 151
151 return ok; 152 return ok;
152 } else { 153 } else {
153 if ( !file.open( IO_ReadWrite ) ) 154 if ( !file.open( IO_ReadWrite ) )
154 return false; 155 return false;
155 156
156 if ( file.size() == 0 ) { 157 if ( file.size() == 0 ) {
157 file.close(); 158 file.close();
158 return true; 159 return true;
159 } 160 }
160 161
161//US bool ok = mFormat->checkFormat( &file ); 162//US bool ok = mFormat->checkFormat( &file );
162 bool ok = true; 163 bool ok = true;
163 164
164 file.close(); 165 file.close();
165 166
166 return ok; 167 return ok;
167 } 168 }
168*/ 169*/
169 qDebug("ResourceOpie::doOpen() has to be fixed - %s", mFileName.latin1()); 170 qDebug("ResourceOpie::doOpen() has to be fixed - %s", mFileName.latin1());
170 return true; 171 return true;
171} 172}
172 173
173void ResourceOpie::doClose() 174void ResourceOpie::doClose()
174{ 175{
175// qDebug("ResourceOpie::doClose() %s", mFileName.latin1()); 176// qDebug("ResourceOpie::doClose() %s", mFileName.latin1());
176} 177}
177 178
178bool ResourceOpie::load() 179bool ResourceOpie::load()
179{ 180{
180// qDebug("ResourceOpie::load() %s", mFileName.latin1()); 181// qDebug("ResourceOpie::load() %s", mFileName.latin1());
181 kdDebug(5700) << "ResourceOpie::load(): '" << mFileName << "'" << endl; 182 kdDebug(5700) << "ResourceOpie::load(): '" << mFileName << "'" << endl;
182 183
183 OContactAccess* access = new OContactAccess("KDEPim/Pi", mFileName, 0l, false); 184 qDebug("ResourceOpie::load: Try to load file() %s", mFileName.latin1());
185
186 OContactAccessBackend_XML* backend = new OContactAccessBackend_XML( "KDEPim/Pi", mFileName );
187 OContactAccess* access = new OContactAccess("KDEPim/Pi", 0l, backend, false);
184 188
185 if ( !access ) { 189 if ( !access ) {
186 qDebug("Unable to load file() %s", mFileName.latin1()); 190 qDebug("Unable to load file() %s", mFileName.latin1());
187 addressBook()->error( i18n( "Unable to load file '%1'." ).arg( mFileName ) ); 191 addressBook()->error( i18n( "Unable to load file '%1'." ).arg( mFileName ) );
188 return false; 192 return false;
189 } 193 }
190 194
191 access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available 195 access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available
192 196
193 if (mConverter == 0) 197 if (mConverter == 0)
194 mConverter = new OpieConverter(); 198 mConverter = new OpieConverter();
195 199
196 200
197 OContactAccess::List::Iterator it; 201 OContactAccess::List::Iterator it;
198 OContactAccess::List allList = access->allRecords(); 202 OContactAccess::List allList = access->allRecords();
199 bool res = false; 203 bool res = false;
200 for ( it = allList.begin(); it != allList.end(); ++it ) 204 for ( it = allList.begin(); it != allList.end(); ++it )
201 { 205 {
202 OContact c = (*it); 206 OContact c = (*it);
203 207
204 KABC::Addressee addressee; 208 KABC::Addressee addressee;
205 209
206 res = mConverter->opieToAddressee( c, addressee ); 210 res = mConverter->opieToAddressee( c, addressee );
207 211
208 if ( !addressee.isEmpty() && res ) 212 if ( !addressee.isEmpty() && res )
209 { 213 {
210 addressee.setResource( this ); 214 addressee.setResource( this );
211 addressBook()->insertAddressee( addressee ); 215 addressBook()->insertAddressee( addressee );
212 } 216 }
213 217
214// qDebug("found %s", c.fullName().latin1()); 218// qDebug("found %s", c.fullName().latin1());
215 } 219 }
216 220
217 delete access; 221 delete access;
222 delete backend;
218 223
219 return true; 224 return true;
220} 225}
221 226
222bool ResourceOpie::save( Ticket *ticket ) 227bool ResourceOpie::save( Ticket *ticket )
223{ 228{
224 qDebug("ResourceOpie::save() has to be fixed - %s", mFileName.latin1()); 229 qDebug("ResourceOpie::save() has to be fixed - %s", mFileName.latin1());
225/*US 230/*US
226 231
227 qDebug("ResourceOpie::save %s", mFileName.latin1()); 232 qDebug("ResourceOpie::save %s", mFileName.latin1());
228 kdDebug(5700) << "ResourceOpie::save()" << endl; 233 kdDebug(5700) << "ResourceOpie::save()" << endl;
229 234
230 // create backup file 235 // create backup file
231 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() ); 236 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
232*/ 237*/
233/*US we use a simpler method to create a backupfile 238/*US we use a simpler method to create a backupfile
234 239
235 (void) KSaveFile::backupFile( mFileName, QString::null 240 (void) KSaveFile::backupFile( mFileName, QString::null
236 ,extension ); 241 ,extension );
237 242
238 KSaveFile saveFile( mFileName ); 243 KSaveFile saveFile( mFileName );
239 bool ok = false; 244 bool ok = false;
240 if ( saveFile.status() == 0 && saveFile.file() ) 245 if ( saveFile.status() == 0 && saveFile.file() )
241 { 246 {
242 mFormat->saveAll( addressBook(), this, saveFile.file() ); 247 mFormat->saveAll( addressBook(), this, saveFile.file() );
243 ok = saveFile.close(); 248 ok = saveFile.close();
244 } 249 }
245*/ 250*/
246/*US 251/*US
247//US ToDo: write backupfile 252//US ToDo: write backupfile
248 QFile info; 253 QFile info;
249 info.setName( mFileName ); 254 info.setName( mFileName );
250 bool ok = info.open( IO_WriteOnly ); 255 bool ok = info.open( IO_WriteOnly );
251 if ( ok ) { 256 if ( ok ) {
252//US mFormat->saveAll( addressBook(), this, &info ); 257//US mFormat->saveAll( addressBook(), this, &info );
253 258
254 info.close(); 259 info.close();
255 ok = true; 260 ok = true;
256 } 261 }
257 else { 262 else {
258 263
259 } 264 }
260 265
261 if ( !ok ) 266 if ( !ok )
262 addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); 267 addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) );
263 268
264 delete ticket; 269 delete ticket;
265 unlock( mFileName ); 270 unlock( mFileName );
266 271
267 return ok; 272 return ok;
268 273
269 qDebug("ResourceOpie::save has to be changed"); 274 qDebug("ResourceOpie::save has to be changed");
270*/ 275*/
271 return true; 276 return true;
272 277
273} 278}
274 279
275bool ResourceOpie::lock( const QString &fileName ) 280bool ResourceOpie::lock( const QString &fileName )
276{ 281{
277 qDebug("ResourceOpie::lock() has to be fixed - %s", mFileName.latin1()); 282 qDebug("ResourceOpie::lock() has to be fixed - %s", mFileName.latin1());
278 283
279/*US 284/*US
280// qDebug("ResourceOpie::lock() %s", fileName.latin1()); 285// qDebug("ResourceOpie::lock() %s", fileName.latin1());
281 kdDebug(5700) << "ResourceOpie::lock()" << endl; 286 kdDebug(5700) << "ResourceOpie::lock()" << endl;
282 287
283 QString fn = fileName; 288 QString fn = fileName;
284 289
285//US change the implementation how the lockfilename is getting created 290//US change the implementation how the lockfilename is getting created
286//US fn.replace( QRegExp("/"), "_" ); 291//US fn.replace( QRegExp("/"), "_" );
287//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); 292//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" );
288 293
289 KURL url(fn); 294 KURL url(fn);
290 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); 295 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" );
291 296
292 kdDebug(5700) << "-- lock name: " << lockName << endl; 297 kdDebug(5700) << "-- lock name: " << lockName << endl;
293 298
294 if (QFile::exists( lockName )) return false; 299 if (QFile::exists( lockName )) return false;
295 300
296 QString lockUniqueName; 301 QString lockUniqueName;
297 lockUniqueName = fn + KApplication::randomString( 8 ); 302 lockUniqueName = fn + KApplication::randomString( 8 );
298 303
299 url = lockUniqueName; 304 url = lockUniqueName;
300//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); 305//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
301 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); 306 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() );
302 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; 307 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl;
303 308
304 // Create unique file 309 // Create unique file
305 QFile file( mLockUniqueName ); 310 QFile file( mLockUniqueName );
306 file.open( IO_WriteOnly ); 311 file.open( IO_WriteOnly );
307 file.close(); 312 file.close();
308 313
309 // Create lock file 314 // Create lock file
310 int result = ::link( QFile::encodeName( mLockUniqueName ), 315 int result = ::link( QFile::encodeName( mLockUniqueName ),
311 QFile::encodeName( lockName ) ); 316 QFile::encodeName( lockName ) );
312 317
313 if ( result == 0 ) { 318 if ( result == 0 ) {
314 addressBook()->emitAddressBookLocked(); 319 addressBook()->emitAddressBookLocked();
315 return true; 320 return true;
316 } 321 }
317 322
318 // TODO: check stat 323 // TODO: check stat
319 324
320 return false; 325 return false;
321*/ 326*/
322 327
323 return true; 328 return true;
324} 329}
325 330
326void ResourceOpie::unlock( const QString &fileName ) 331void ResourceOpie::unlock( const QString &fileName )
327{ 332{
328 qDebug("ResourceOpie::unlock() has to be fixed - %s", mFileName.latin1()); 333 qDebug("ResourceOpie::unlock() has to be fixed - %s", mFileName.latin1());
329/*US 334/*US
330// qDebug("ResourceOpie::unlock() %s", fileName.latin1()); 335// qDebug("ResourceOpie::unlock() %s", fileName.latin1());
331 336
332 QString fn = fileName; 337 QString fn = fileName;
333//US change the implementation how the lockfilename is getting created 338//US change the implementation how the lockfilename is getting created
334//US fn.replace( QRegExp( "/" ), "_" ); 339//US fn.replace( QRegExp( "/" ), "_" );
335//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); 340//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" );
336//US QString lockName = fn + ".lock"; 341//US QString lockName = fn + ".lock";
337 KURL url(fn); 342 KURL url(fn);
338 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); 343 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" );
339 344
340 QFile::remove( lockName ); 345 QFile::remove( lockName );
341 QFile::remove( mLockUniqueName ); 346 QFile::remove( mLockUniqueName );
342 addressBook()->emitAddressBookUnlocked(); 347 addressBook()->emitAddressBookUnlocked();
343*/ 348*/
344} 349}
345 350
346void ResourceOpie::setFileName( const QString &fileName ) 351void ResourceOpie::setFileName( const QString &fileName )
347{ 352{
348/*US ToDo: no synchronization so far. Has to be changed in the future 353/*US ToDo: no synchronization so far. Has to be changed in the future
349 mDirWatch.stopScan(); 354 mDirWatch.stopScan();
350 mDirWatch.removeFile( mFileName ); 355 mDirWatch.removeFile( mFileName );
351*/ 356*/
352 mFileName = fileName; 357 mFileName = fileName;
353 358
354 359
355/*US ToDo: no synchronization so far. Has to be changed in the future 360/*US ToDo: no synchronization so far. Has to be changed in the future
356 mDirWatch.addFile( mFileName ); 361 mDirWatch.addFile( mFileName );
357 mDirWatch.startScan(); 362 mDirWatch.startScan();
358*/ 363*/
359//US simulate KDirWatch event 364//US simulate KDirWatch event
360 fileChanged(); 365 fileChanged();
361} 366}
362 367
363QString ResourceOpie::fileName() const 368QString ResourceOpie::fileName() const
364{ 369{
365 return mFileName; 370 return mFileName;
366} 371}
367 372
368void ResourceOpie::fileChanged() 373void ResourceOpie::fileChanged()
369{ 374{
370 // There is a small theoretical chance that KDirWatch calls us before 375 // There is a small theoretical chance that KDirWatch calls us before
371 // we are fully constructed 376 // we are fully constructed
372 if (!addressBook()) 377 if (!addressBook())
373 return; 378 return;
374 load(); 379 load();
375 addressBook()->emitAddressBookChanged(); 380 addressBook()->emitAddressBookChanged();
376} 381}
377 382
378void ResourceOpie::removeAddressee( const Addressee &addr ) 383void ResourceOpie::removeAddressee( const Addressee &addr )
379{ 384{
380/*US 385/*US
381 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) ); 386 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/photos/" ) + addr.uid() ) );
382 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) ); 387 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/logos/" ) + addr.uid() ) );
383 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) ); 388 QFile::remove( QFile::encodeName( locateLocal( "data", "kabc/sounds/" ) + addr.uid() ) );
384*/ 389*/
385} 390}
386 391
387void ResourceOpie::cleanUp() 392void ResourceOpie::cleanUp()
388{ 393{
389// qDebug("ResourceOpie::cleanup() %s", mFileName.latin1()); 394// qDebug("ResourceOpie::cleanup() %s", mFileName.latin1());
390 395
391 unlock( mFileName ); 396 unlock( mFileName );
392} 397}
393 398
394//US #include "resourceopie.moc" 399//US #include "resourceopie.moc"