-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 | |||
@@ -154,25 +154,25 @@ void ResourceQtopia::doClose() | |||
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() ) { |
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 | |||
@@ -64,23 +64,23 @@ QtopiaXXPort::QtopiaXXPort( KABC::AddressBook *ab, QWidget *parent, const char * | |||
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 | } |