-rw-r--r-- | library/applnk.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp index 4adf1bd..8763eb2 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp | |||
@@ -437,65 +437,65 @@ AppLnk& AppLnk::operator=(const AppLnk ©) | |||
437 | 437 | ||
438 | /* remove for Qtopia 3.0 -zecke */ | 438 | /* remove for Qtopia 3.0 -zecke */ |
439 | mPixmap = copy.mPixmap; | 439 | mPixmap = copy.mPixmap; |
440 | mBigPixmap = copy.mBigPixmap; | 440 | mBigPixmap = copy.mBigPixmap; |
441 | 441 | ||
442 | mExec = copy.mExec; | 442 | mExec = copy.mExec; |
443 | mType = copy.mType; | 443 | mType = copy.mType; |
444 | mRotation = copy.mRotation; | 444 | mRotation = copy.mRotation; |
445 | mComment = copy.mComment; | 445 | mComment = copy.mComment; |
446 | mFile = copy.mFile; | 446 | mFile = copy.mFile; |
447 | mLinkFile = copy.mLinkFile; | 447 | mLinkFile = copy.mLinkFile; |
448 | mIconFile = copy.mIconFile; | 448 | mIconFile = copy.mIconFile; |
449 | mMimeTypes = copy.mMimeTypes; | 449 | mMimeTypes = copy.mMimeTypes; |
450 | mMimeTypeIcons = copy.mMimeTypeIcons; | 450 | mMimeTypeIcons = copy.mMimeTypeIcons; |
451 | mId = 0; | 451 | mId = 0; |
452 | d = new AppLnkPrivate(); | 452 | d = new AppLnkPrivate(); |
453 | d->mCat = copy.d->mCat; | 453 | d->mCat = copy.d->mCat; |
454 | d->mCatList = copy.d->mCatList; | 454 | d->mCatList = copy.d->mCatList; |
455 | d->mPixmaps = copy.d->mPixmaps; | 455 | d->mPixmaps = copy.d->mPixmaps; |
456 | 456 | ||
457 | return *this; | 457 | return *this; |
458 | } | 458 | } |
459 | /*! | 459 | /*! |
460 | protected internally to share code | 460 | protected internally to share code |
461 | should I document that at all? | 461 | should I document that at all? |
462 | I don't know the TT style for that | 462 | I don't know the TT style for that |
463 | */ | 463 | */ |
464 | const QPixmap& AppLnk::pixmap( int pos, int size ) const { | 464 | const QPixmap& AppLnk::pixmap( int pos, int size ) const { |
465 | if ( d->mPixmaps[pos].isNull() ) { | 465 | if ( d->mPixmaps[pos].isNull() ) { |
466 | AppLnk* that = (AppLnk*)this; | 466 | AppLnk* that = (AppLnk*)this; |
467 | if ( mIconFile.isEmpty() ) { | 467 | if ( mIconFile.isEmpty() ) { |
468 | MimeType mt(type()); | 468 | MimeType mt(type()); |
469 | that->d->mPixmaps[pos] = mt.pixmap(); | 469 | that->d->mPixmaps[pos] = pos ? mt.bigPixmap() : mt.pixmap(); |
470 | if ( that->d->mPixmaps[pos].isNull() ) | 470 | if ( that->d->mPixmaps[pos].isNull() ) |
471 | that->d->mPixmaps[pos].convertFromImage( | 471 | that->d->mPixmaps[pos].convertFromImage( |
472 | Resource::loadImage("UnknownDocument") | 472 | Resource::loadImage("UnknownDocument") |
473 | .smoothScale( size, size ) ); | 473 | .smoothScale( size, size ) ); |
474 | return that->d->mPixmaps[pos]; | 474 | return that->d->mPixmaps[pos]; |
475 | } | 475 | } |
476 | QImage unscaledIcon = Resource::loadImage( that->mIconFile ); | 476 | QImage unscaledIcon = Resource::loadImage( that->mIconFile ); |
477 | if ( unscaledIcon.isNull() ) { | 477 | if ( unscaledIcon.isNull() ) { |
478 | // qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); | 478 | // qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); |
479 | that->d->mPixmaps[pos].convertFromImage( | 479 | that->d->mPixmaps[pos].convertFromImage( |
480 | Resource::loadImage("UnknownDocument") | 480 | Resource::loadImage("UnknownDocument") |
481 | .smoothScale( size, size ) ); | 481 | .smoothScale( size, size ) ); |
482 | } else { | 482 | } else { |
483 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); | 483 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); |
484 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); | 484 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); |
485 | } | 485 | } |
486 | return that->d->mPixmaps[pos]; | 486 | return that->d->mPixmaps[pos]; |
487 | } | 487 | } |
488 | return d->mPixmaps[pos]; | 488 | return d->mPixmaps[pos]; |
489 | } | 489 | } |
490 | 490 | ||
491 | /*! | 491 | /*! |
492 | Returns a small pixmap associated with the application. | 492 | Returns a small pixmap associated with the application. |
493 | 493 | ||
494 | \sa bigPixmap() setIcon() | 494 | \sa bigPixmap() setIcon() |
495 | */ | 495 | */ |
496 | const QPixmap& AppLnk::pixmap() const | 496 | const QPixmap& AppLnk::pixmap() const |
497 | { | 497 | { |
498 | if ( d->mPixmaps[0].isNull() ) { | 498 | if ( d->mPixmaps[0].isNull() ) { |
499 | return pixmap(AppLnkPrivate::Normal, smallSize ); | 499 | return pixmap(AppLnkPrivate::Normal, smallSize ); |
500 | } | 500 | } |
501 | return d->mPixmaps[0]; | 501 | return d->mPixmaps[0]; |