author | zautrix <zautrix> | 2004-10-29 11:24:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 11:24:47 (UTC) |
commit | 443116d2682cd221c25201926e35d825170bdbbd (patch) (unidiff) | |
tree | 86e8e5965b489cd3d537e9872ff106019476c559 /kabc/plugins | |
parent | 2d28a226645f56a96fe0a8252e0d7e7b2cc4df2e (diff) | |
download | kdepimpi-443116d2682cd221c25201926e35d825170bdbbd.zip kdepimpi-443116d2682cd221c25201926e35d825170bdbbd.tar.gz kdepimpi-443116d2682cd221c25201926e35d825170bdbbd.tar.bz2 |
fix
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 2 |
1 files changed, 1 insertions, 1 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 | |||
@@ -142,49 +142,49 @@ bool ResourceQtopia::doOpen() | |||
142 | } | 142 | } |
143 | 143 | ||
144 | void ResourceQtopia::doClose() | 144 | void ResourceQtopia::doClose() |
145 | { | 145 | { |
146 | qDebug("ResourceQtopia::doClose: %s", fileName().latin1()); | 146 | qDebug("ResourceQtopia::doClose: %s", fileName().latin1()); |
147 | 147 | ||
148 | 148 | ||
149 | // it seems so, that deletion of access deletes backend as well | 149 | // it seems so, that deletion of access deletes backend as well |
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 | { |
183 | addressee.setResource( this ); | 183 | addressee.setResource( this ); |
184 | addressBook()->insertAddressee( addressee ); | 184 | addressBook()->insertAddressee( addressee ); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | no = no.nextSibling(); | 188 | no = no.nextSibling(); |
189 | } | 189 | } |
190 | } | 190 | } |