summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-06-04 12:58:17 (UTC)
committer zautrix <zautrix>2005-06-04 12:58:17 (UTC)
commit790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75 (patch) (side-by-side diff)
tree7779130ff5f142e1eaf2989e8540cbedc9ea0cb1 /kaddressbook
parenta7939017000e165e711e3f0cffeab46852a9fb2e (diff)
downloadkdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.zip
kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.gz
kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.bz2
pic fix
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/imagewidget.cpp21
-rw-r--r--kaddressbook/imagewidget.h2
2 files changed, 4 insertions, 19 deletions
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index d0f52ea..eec5e08 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -272,41 +272,26 @@ void ImageWidget::loadLogo()
void ImageWidget::updateGUI()
{
KURLRequester *ptr = (KURLRequester*)sender();
if ( ptr == mPhotoUrl )
mUsePhotoUrl->setEnabled( true );
else if ( ptr == mLogoUrl )
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;
}
#ifndef KAB_EMBEDDED
#include "imagewidget.moc"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index afb9aa7..bbfba58 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -65,24 +65,24 @@ class ImageWidget : public QWidget
signals:
void changed();
private slots:
void loadPhoto();
void loadLogo();
void removePhoto();
void removeLogo();
void updateGUI();
private:
- QPixmap loadPixmap( const KURL &url );
+ QPixmap loadPixmap( const QString &url );
KURLRequester *mPhotoUrl;
KURLRequester *mLogoUrl;
QCheckBox *mUsePhotoUrl;
QCheckBox *mUseLogoUrl;
QLabel *mPhotoLabel;
QLabel *mLogoLabel;
};
#endif