-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/xxport/qtopia_xxport.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp index cf6b11a..79ddaea 100644 --- a/kabc/plugins/qtopia/resourceqtopia.cpp +++ b/kabc/plugins/qtopia/resourceqtopia.cpp | |||
@@ -150,33 +150,33 @@ void ResourceQtopia::doClose() | |||
150 | //delete backend; | 150 | //delete backend; |
151 | 151 | ||
152 | return; | 152 | return; |
153 | } | 153 | } |
154 | 154 | ||
155 | bool ResourceQtopia::load() | 155 | bool ResourceQtopia::load() |
156 | { | 156 | { |
157 | 157 | ||
158 | QFile file( fileName() ); | 158 | QFile file( fileName() ); |
159 | if ( !file.open(IO_ReadOnly ) ) { | 159 | if ( !file.open(IO_ReadOnly ) ) { |
160 | return false; | 160 | return false; |
161 | } | 161 | } |
162 | 162 | ||
163 | QDomDocument doc("mydocument" ); | 163 | QDomDocument doc("mydocument" ); |
164 | if ( !doc.setContent( &file ) ) { | 164 | if ( !doc.setContent( &file ) ) { |
165 | file.close(); | 165 | file.close(); |
166 | return true; | 166 | return false; |
167 | } | 167 | } |
168 | bool res; | 168 | bool res; |
169 | QDomElement docElem = doc.documentElement( ); | 169 | QDomElement docElem = doc.documentElement( ); |
170 | QDomNode n = docElem.firstChild(); | 170 | QDomNode n = docElem.firstChild(); |
171 | while ( !n.isNull() ) { | 171 | while ( !n.isNull() ) { |
172 | QDomElement e = n.toElement(); | 172 | QDomElement e = n.toElement(); |
173 | if ( !e.isNull() ) { | 173 | if ( !e.isNull() ) { |
174 | if ( e.tagName() == QString::fromLatin1( "Contacts" ) ) { | 174 | if ( e.tagName() == QString::fromLatin1( "Contacts" ) ) { |
175 | QDomNode no = e.firstChild(); | 175 | QDomNode no = e.firstChild(); |
176 | while ( !no.isNull() ) { | 176 | while ( !no.isNull() ) { |
177 | QDomElement el = no.toElement(); | 177 | QDomElement el = no.toElement(); |
178 | if ( !el.isNull() ) { | 178 | if ( !el.isNull() ) { |
179 | KABC::Addressee addressee; | 179 | KABC::Addressee addressee; |
180 | res = mConverter->qtopiaToAddressee( el, addressee ); | 180 | res = mConverter->qtopiaToAddressee( el, addressee ); |
181 | if ( !addressee.isEmpty() && res ) | 181 | if ( !addressee.isEmpty() && res ) |
182 | { | 182 | { |
diff --git a/kaddressbook/xxport/qtopia_xxport.cpp b/kaddressbook/xxport/qtopia_xxport.cpp index fc4abbb..e3457a1 100644 --- a/kaddressbook/xxport/qtopia_xxport.cpp +++ b/kaddressbook/xxport/qtopia_xxport.cpp | |||
@@ -60,27 +60,27 @@ QtopiaXXPort::QtopiaXXPort( KABC::AddressBook *ab, QWidget *parent, const char * | |||
60 | : XXPortResourceObject( ab, parent, name ) | 60 | : XXPortResourceObject( ab, parent, name ) |
61 | { | 61 | { |
62 | defaultFileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; | 62 | defaultFileName = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; |
63 | 63 | ||
64 | if ( mFactory && !mFactory->typeName( "qtopia" ).isEmpty() ) | 64 | if ( mFactory && !mFactory->typeName( "qtopia" ).isEmpty() ) |
65 | { | 65 | { |
66 | createImportAction( i18n( "Import xml (Qtopia)..." ) ); | 66 | createImportAction( i18n( "Import xml (Qtopia)..." ) ); |
67 | createExportAction( i18n( "Export xml (Qtopia)..." ) ); | 67 | createExportAction( i18n( "Export xml (Qtopia)..." ) ); |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | bool QtopiaXXPort::exportContacts( const KABC::AddresseeList &list, const QString &identifier ) | 71 | bool QtopiaXXPort::exportContacts( const KABC::AddresseeList &list, const QString &identifier ) |
72 | { | 72 | { |
73 | QString fn =KFileDialog::getSaveFileName( defaultFileName, i18n("Import xml file"), 0 ); | 73 | QString fn =KFileDialog::getSaveFileName( defaultFileName, i18n("Import xml file"), 0 ); |
74 | if ( fn == "" ) | 74 | if ( fn == "" ) |
75 | return false; | 75 | return false; |
76 | 76 | ||
77 | return _exportContacts( list, identifier, fn ); | 77 | return _exportContacts( list, identifier, fn ); |
78 | } | 78 | } |
79 | 79 | ||
80 | KABC::AddresseeList QtopiaXXPort::importContacts( const QString &identifier ) const | 80 | KABC::AddresseeList QtopiaXXPort::importContacts( const QString &identifier ) const |
81 | { | 81 | { |
82 | QString fn =KFileDialog::getOpenFileName( defaultFileName, i18n("Import xml file"), 0 ); | 82 | QString fn =KFileDialog::getOpenFileName( defaultFileName, i18n("Import xml file"), 0 ); |
83 | if ( fn == "" ) | 83 | if ( fn == "" ) |
84 | return KABC::AddresseeList() ; | 84 | return KABC::AddresseeList() ; |
85 | return _importContacts( identifier, fn ); | 85 | return _importContacts( identifier, fn ); |
86 | } | 86 | } |