-rw-r--r-- | kaddressbook/imagewidget.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index d0f52ea..eec5e08 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp | |||
@@ -281,29 +281,14 @@ void ImageWidget::updateGUI() | |||
281 | mUseLogoUrl->setEnabled( true ); | 281 | mUseLogoUrl->setEnabled( true ); |
282 | } | 282 | } |
283 | 283 | ||
284 | QPixmap ImageWidget::loadPixmap( const KURL &url ) | 284 | QPixmap ImageWidget::loadPixmap( const QString &url ) |
285 | { | 285 | { |
286 | QString tempFile; | 286 | |
287 | QPixmap pixmap; | 287 | QPixmap pixmap; |
288 | 288 | ||
289 | if ( url.isEmpty() ) | 289 | if ( url.isEmpty() ) |
290 | return pixmap; | 290 | return pixmap; |
291 | 291 | pixmap.load( url ); | |
292 | if ( url.isLocalFile() ) | ||
293 | pixmap = QPixmap( url.path() ); | ||
294 | else | ||
295 | { | ||
296 | #ifndef KAB_EMBEDDED | ||
297 | if ( KIO::NetAccess::download( url, tempFile ) ) { | ||
298 | pixmap = QPixmap( tempFile ); | ||
299 | KIO::NetAccess::removeTempFile( tempFile ); | ||
300 | } | ||
301 | #else //KAB_EMBEDDED | ||
302 | qDebug("ImageWidget::loadPixmap : only local pixmaps are allowed"); | ||
303 | #endif //KAB_EMBEDDED | ||
304 | |||
305 | } | ||
306 | |||
307 | return pixmap; | 292 | return pixmap; |
308 | } | 293 | } |
309 | 294 | ||