summaryrefslogtreecommitdiffabout
path: root/kabc/vcardformatplugin.cpp
Unidiff
Diffstat (limited to 'kabc/vcardformatplugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/vcardformatplugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp
index 8db8c11..0b97a08 100644
--- a/kabc/vcardformatplugin.cpp
+++ b/kabc/vcardformatplugin.cpp
@@ -16,55 +16,55 @@
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#include "vcardformatplugin.h" 21#include "vcardformatplugin.h"
22#include "vcardformatimpl.h" 22#include "vcardformatimpl.h"
23 23
24using namespace KABC; 24using namespace KABC;
25 25
26VCardFormatPlugin::VCardFormatPlugin() 26VCardFormatPlugin::VCardFormatPlugin()
27{ 27{
28 mImpl = new VCardFormatImpl; 28 mImpl = new VCardFormatImpl;
29} 29}
30 30
31VCardFormatPlugin::~VCardFormatPlugin() 31VCardFormatPlugin::~VCardFormatPlugin()
32{ 32{
33 delete mImpl; 33 delete mImpl;
34} 34}
35 35
36bool VCardFormatPlugin::load( Addressee &addressee, QFile *file ) 36bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
37{ 37{
38 qDebug("VCardFormatPlugin::load"); 38 qDebug("VCardFormatPlugin::load");
39 return mImpl->load( addressee, file ); 39 return mImpl->load( addressee, file );
40} 40}
41 41
42bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) 42bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
43{ 43{
44 // qDebug("VCardFormatPlugin::loadAll"); 44 // qDebug("VCardFormatPlugin::loadAll");
45 return mImpl->loadAll( addressBook, resource, file ); 45 return mImpl->loadAll( addressBook, resource, file );
46} 46}
47 47
48void VCardFormatPlugin::save( const Addressee &addressee, QFile *file ) 48void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
49{ 49{
50 qDebug("VCardFormatPlugin::save"); 50 qDebug("VCardFormatPlugin::save");
51 mImpl->save( addressee, file ); 51 mImpl->save( addressee, file );
52} 52}
53 53
54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file ) 54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file )
55{ 55{
56 qDebug("VCardFormatPlugin::saveAll"); 56 qDebug("VCardFormatPlugin::saveAll");
57 mImpl->saveAll( addressBook, resource, file ); 57 mImpl->saveAll( addressBook, resource, file );
58} 58}
59 59
60bool VCardFormatPlugin::checkFormat( QFile *file ) const 60bool VCardFormatPlugin::checkFormat( QFile *file ) const
61{ 61{
62 QString line; 62 QString line;
63 63
64 file->readLine( line, 1024 ); 64 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
65 line = line.stripWhiteSpace(); 65 line = line.stripWhiteSpace();
66 if ( line == "BEGIN:VCARD" ) 66 if ( line == "BEGIN:VCARD" )
67 return true; 67 return true;
68 else 68 else
69 return false; 69 return false;
70} 70}