author | zautrix <zautrix> | 2005-06-04 12:58:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-04 12:58:17 (UTC) |
commit | 790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75 (patch) (unidiff) | |
tree | 7779130ff5f142e1eaf2989e8540cbedc9ea0cb1 | |
parent | a7939017000e165e711e3f0cffeab46852a9fb2e (diff) | |
download | kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.zip kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.gz kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.bz2 |
pic fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | kaddressbook/imagewidget.cpp | 21 | ||||
-rw-r--r-- | kaddressbook/imagewidget.h | 2 |
3 files changed, 5 insertions, 19 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 93edc59..6e3b886 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -12,4 +12,5 @@ That makes it possible to display "lastname, firstname" in that view now. | |||
12 | To set the formatted name for all contacts, please use menu: | 12 | To set the formatted name for all contacts, please use menu: |
13 | Edit->Change->Set formatted name. | 13 | Edit->Change->Set formatted name. |
14 | Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. | ||
14 | 15 | ||
15 | ********** VERSION 2.1.4 ************ | 16 | ********** VERSION 2.1.4 ************ |
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index d0f52ea..eec5e08 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp | |||
@@ -282,27 +282,12 @@ void ImageWidget::updateGUI() | |||
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 | } |
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index afb9aa7..bbfba58 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h | |||
@@ -75,5 +75,5 @@ class ImageWidget : public QWidget | |||
75 | 75 | ||
76 | private: | 76 | private: |
77 | QPixmap loadPixmap( const KURL &url ); | 77 | QPixmap loadPixmap( const QString &url ); |
78 | 78 | ||
79 | KURLRequester *mPhotoUrl; | 79 | KURLRequester *mPhotoUrl; |