author | zecke <zecke> | 2002-09-25 16:10:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-25 16:10:02 (UTC) |
commit | a546a6ea143da9244a06f1e40829254e8bf4dc8f (patch) (unidiff) | |
tree | 6e9e2a5606e9eec5f6ac751dd99ddedf1e42fb29 /library/applnk.cpp | |
parent | 5b7e930de7cc42f14b078072b8d23b977001e7b6 (diff) | |
download | opie-a546a6ea143da9244a06f1e40829254e8bf4dc8f.zip opie-a546a6ea143da9244a06f1e40829254e8bf4dc8f.tar.gz opie-a546a6ea143da9244a06f1e40829254e8bf4dc8f.tar.bz2 |
Fix bigPixmaps BUG.
instead of returning the bigPixmap from the d->mPixmaps[1] I returned
the deprecated variable which was null
-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 1f053f3..44f3f58 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp | |||
@@ -462,65 +462,65 @@ const QPixmap& AppLnk::pixmap( int pos, int size ) const { | |||
462 | } else { | 462 | } else { |
463 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); | 463 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); |
464 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); | 464 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); |
465 | } | 465 | } |
466 | return that->d->mPixmaps[pos]; | 466 | return that->d->mPixmaps[pos]; |
467 | } | 467 | } |
468 | return d->mPixmaps[pos]; | 468 | return d->mPixmaps[pos]; |
469 | } | 469 | } |
470 | 470 | ||
471 | /*! | 471 | /*! |
472 | Returns a small pixmap associated with the application. | 472 | Returns a small pixmap associated with the application. |
473 | 473 | ||
474 | \sa bigPixmap() setIcon() | 474 | \sa bigPixmap() setIcon() |
475 | */ | 475 | */ |
476 | const QPixmap& AppLnk::pixmap() const | 476 | const QPixmap& AppLnk::pixmap() const |
477 | { | 477 | { |
478 | if ( d->mPixmaps[0].isNull() ) { | 478 | if ( d->mPixmaps[0].isNull() ) { |
479 | return pixmap(AppLnkPrivate::Normal, smallSize ); | 479 | return pixmap(AppLnkPrivate::Normal, smallSize ); |
480 | } | 480 | } |
481 | return d->mPixmaps[0]; | 481 | return d->mPixmaps[0]; |
482 | } | 482 | } |
483 | 483 | ||
484 | /*! | 484 | /*! |
485 | Returns a large pixmap associated with the application. | 485 | Returns a large pixmap associated with the application. |
486 | 486 | ||
487 | \sa pixmap() setIcon() | 487 | \sa pixmap() setIcon() |
488 | */ | 488 | */ |
489 | const QPixmap& AppLnk::bigPixmap() const | 489 | const QPixmap& AppLnk::bigPixmap() const |
490 | { | 490 | { |
491 | if ( d->mPixmaps[1].isNull() ) { | 491 | if ( d->mPixmaps[1].isNull() ) { |
492 | return pixmap( AppLnkPrivate::Big, bigSize ); | 492 | return pixmap( AppLnkPrivate::Big, bigSize ); |
493 | } | 493 | } |
494 | return mBigPixmap; | 494 | return d->mPixmaps[1]; |
495 | } | 495 | } |
496 | 496 | ||
497 | /*! | 497 | /*! |
498 | Returns the type of the AppLnk. For applications, games and | 498 | Returns the type of the AppLnk. For applications, games and |
499 | settings the type is \c Application; for documents the type is the | 499 | settings the type is \c Application; for documents the type is the |
500 | document's MIME type. | 500 | document's MIME type. |
501 | */ | 501 | */ |
502 | QString AppLnk::type() const | 502 | QString AppLnk::type() const |
503 | { | 503 | { |
504 | if ( mType.isNull() ) { | 504 | if ( mType.isNull() ) { |
505 | AppLnk* that = (AppLnk*)this; | 505 | AppLnk* that = (AppLnk*)this; |
506 | QString f = file(); | 506 | QString f = file(); |
507 | if ( !f.isNull() ) { | 507 | if ( !f.isNull() ) { |
508 | MimeType mt(f); | 508 | MimeType mt(f); |
509 | that->mType = mt.id(); | 509 | that->mType = mt.id(); |
510 | return that->mType; | 510 | return that->mType; |
511 | } | 511 | } |
512 | } | 512 | } |
513 | return mType; | 513 | return mType; |
514 | } | 514 | } |
515 | 515 | ||
516 | /*! | 516 | /*! |
517 | Returns the file associated with the AppLnk. | 517 | Returns the file associated with the AppLnk. |
518 | 518 | ||
519 | \sa exec() name() | 519 | \sa exec() name() |
520 | */ | 520 | */ |
521 | QString AppLnk::file() const | 521 | QString AppLnk::file() const |
522 | { | 522 | { |
523 | if ( mFile.isNull() ) { | 523 | if ( mFile.isNull() ) { |
524 | AppLnk* that = (AppLnk*)this; | 524 | AppLnk* that = (AppLnk*)this; |
525 | QString ext = MimeType(mType).extension(); | 525 | QString ext = MimeType(mType).extension(); |
526 | if ( !ext.isEmpty() ) | 526 | if ( !ext.isEmpty() ) |