summaryrefslogtreecommitdiffabout
path: root/kde2file/abdump/main.cpp
Unidiff
Diffstat (limited to 'kde2file/abdump/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kde2file/abdump/main.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/kde2file/abdump/main.cpp b/kde2file/abdump/main.cpp
index 1ee64f5..9ad78e5 100644
--- a/kde2file/abdump/main.cpp
+++ b/kde2file/abdump/main.cpp
@@ -95,26 +95,24 @@ int main( int argc, char *argv[] )
95 KABC::StdAddressBook* standardAddressBook = KABC::StdAddressBook::self(); 95 KABC::StdAddressBook* standardAddressBook = KABC::StdAddressBook::self();
96 standardAddressBook->setAutomaticSave( false ); 96 standardAddressBook->setAutomaticSave( false );
97 qDebug("************************************* "); 97 qDebug("************************************* ");
98 qDebug("***************kdeABdump************* "); 98 qDebug("***************kdeABdump************* ");
99 qDebug("************************************* "); 99 qDebug("************************************* ");
100 if ( !read ) { 100 if ( !read ) {
101 KABC::AddressBook::Iterator it; 101 KABC::AddressBook::Iterator it;
102 KABC::VCardConverter converter; 102 KABC::VCardConverter converter;
103 QString datastream; 103 QString datastream;
104 for( it = standardAddressBook->begin(); it != standardAddressBook->end(); ++it ) { 104 for( it = standardAddressBook->begin(); it != standardAddressBook->end(); ++it ) {
105 if ( (*it).isEmpty() || ! (*it).resource() ) 105 if ( (*it).isEmpty() || ! (*it).resource() )
106 continue; 106 continue;
107 if ( (*it).resource()->readOnly() )
108 continue;
109 KABC::Addressee a = ( *it ); 107 KABC::Addressee a = ( *it );
110 QString vcard = converter.createVCard( a ); 108 QString vcard = converter.createVCard( a );
111 vcard += QString("\r\n"); 109 vcard += QString("\r\n");
112 datastream += vcard; 110 datastream += vcard;
113 } 111 }
114 QFile outFile(fileName); 112 QFile outFile(fileName);
115 if ( outFile.open(IO_WriteOnly) ) { 113 if ( outFile.open(IO_WriteOnly) ) {
116 QTextStream t( &outFile ); // use a text stream 114 QTextStream t( &outFile ); // use a text stream
117 t.setEncoding( QTextStream::UnicodeUTF8 ); 115 t.setEncoding( QTextStream::UnicodeUTF8 );
118 t <<datastream; 116 t <<datastream;
119 t << "\r\n\r\n"; 117 t << "\r\n\r\n";
120 outFile.close(); 118 outFile.close();