summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/applnk.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 80f2c62..c82d3b9 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -461,36 +461,38 @@ AppLnk& AppLnk::operator=(const AppLnk &copy)
461const QPixmap& AppLnk::pixmap( int pos, int size ) const { 461const QPixmap& AppLnk::pixmap( int pos, int size ) const {
462 if ( d->mPixmaps[pos].isNull() ) { 462 if ( d->mPixmaps[pos].isNull() ) {
463 AppLnk* that = (AppLnk*)this; 463 AppLnk* that = (AppLnk*)this;
464 if ( mIconFile.isEmpty() ) { 464 if ( mIconFile.isEmpty() ) {
465 MimeType mt(type()); 465 MimeType mt(type());
466 that->d->mPixmaps[pos] = pos ? mt.bigPixmap() : mt.pixmap(); 466 that->d->mPixmaps[pos] = pos ? mt.bigPixmap() : mt.pixmap();
467 if ( that->d->mPixmaps[pos].isNull() ) 467 if ( that->d->mPixmaps[pos].isNull() )
468 that->d->mPixmaps[pos].convertFromImage( 468 that->d->mPixmaps[pos].convertFromImage(
469 Resource::loadImage("UnknownDocument") 469 Resource::loadImage("UnknownDocument")
470 .smoothScale( size, size ) ); 470 .smoothScale( size, size ) );
471 return that->d->mPixmaps[pos]; 471 return that->d->mPixmaps[pos];
472 } 472 }
473
473 QImage unscaledIcon = Resource::loadImage( that->mIconFile ); 474 QImage unscaledIcon = Resource::loadImage( that->mIconFile );
474 if ( unscaledIcon.isNull() ) { 475 if ( unscaledIcon.isNull() ) {
475 // qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); 476 // qDebug( "Cannot find icon: %s", that->mIconFile.latin1() );
476 that->d->mPixmaps[pos].convertFromImage( 477 that->d->mPixmaps[pos].convertFromImage(
477 Resource::loadImage("UnknownDocument") 478 Resource::loadImage("UnknownDocument")
478 .smoothScale( size, size ) ); 479 .smoothScale( size, size ) );
479 } else { 480 } else {
480 that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); 481 that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
481 that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); 482 that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
482 } 483 }
483 return that->d->mPixmaps[pos]; 484 return that->d->mPixmaps[pos];
484 } 485 }
486
485 return d->mPixmaps[pos]; 487 return d->mPixmaps[pos];
486} 488}
487 489
488/*! 490/*!
489 Returns a small pixmap associated with the application. 491 Returns a small pixmap associated with the application.
490 492
491 \sa bigPixmap() setIcon() 493 \sa bigPixmap() setIcon()
492*/ 494*/
493const QPixmap& AppLnk::pixmap() const 495const QPixmap& AppLnk::pixmap() const
494{ 496{
495 if ( d->mPixmaps[0].isNull() ) { 497 if ( d->mPixmaps[0].isNull() ) {
496 return pixmap(AppLnkPrivate::Normal, smallSize ); 498 return pixmap(AppLnkPrivate::Normal, smallSize );