From 790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 04 Jun 2005 12:58:17 +0000 Subject: pic fix --- (limited to 'kaddressbook') 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() mUseLogoUrl->setEnabled( true ); } -QPixmap ImageWidget::loadPixmap( const KURL &url ) +QPixmap ImageWidget::loadPixmap( const QString &url ) { - QString tempFile; + QPixmap pixmap; if ( url.isEmpty() ) return pixmap; - - if ( url.isLocalFile() ) - pixmap = QPixmap( url.path() ); - else - { -#ifndef KAB_EMBEDDED - if ( KIO::NetAccess::download( url, tempFile ) ) { - pixmap = QPixmap( tempFile ); - KIO::NetAccess::removeTempFile( tempFile ); - } -#else //KAB_EMBEDDED - qDebug("ImageWidget::loadPixmap : only local pixmaps are allowed"); -#endif //KAB_EMBEDDED - - } - + pixmap.load( url ); return pixmap; } diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index afb9aa7..bbfba58 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h @@ -74,7 +74,7 @@ class ImageWidget : public QWidget void updateGUI(); private: - QPixmap loadPixmap( const KURL &url ); + QPixmap loadPixmap( const QString &url ); KURLRequester *mPhotoUrl; KURLRequester *mLogoUrl; -- cgit v0.9.0.2