summaryrefslogtreecommitdiff
authorzecke <zecke>2005-02-23 22:59:25 (UTC)
committer zecke <zecke>2005-02-23 22:59:25 (UTC)
commit729a178d1da1b8f80e4b1f6b0fc2c6a4cd15a403 (patch) (unidiff)
tree968a422532f4596d2ab5530127e28cd948776778
parent9e2e6d962e1e2d3e5c17641d9a9b21a5906bd262 (diff)
downloadopie-729a178d1da1b8f80e4b1f6b0fc2c6a4cd15a403.zip
opie-729a178d1da1b8f80e4b1f6b0fc2c6a4cd15a403.tar.gz
opie-729a178d1da1b8f80e4b1f6b0fc2c6a4cd15a403.tar.bz2
Fix crappy indenting on the methods I'm about to touch. Even TT fixed it...
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
@@ -449,60 +449,62 @@ AppLnk& AppLnk::operator=(const AppLnk &copy)
449 d = new AppLnkPrivate(); 449 d = new AppLnkPrivate();
450 d->mCat = copy.d->mCat; 450 d->mCat = copy.d->mCat;
451 d->mCatList = copy.d->mCatList; 451 d->mCatList = copy.d->mCatList;
452 d->mPixmaps = copy.d->mPixmaps; 452 d->mPixmaps = copy.d->mPixmaps;
453 453
454 return *this; 454 return *this;
455} 455}
456/*! 456/*!
457 protected internally to share code 457 protected internally to share code
458 should I document that at all? 458 should I document that at all?
459 I don't know the TT style for that 459 I don't know the TT style for that
460*/ 460*/
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 );
497 } 499 }
498 return d->mPixmaps[0]; 500 return d->mPixmaps[0];
499} 501}
500 502
501/*! 503/*!
502 Returns a large pixmap associated with the application. 504 Returns a large pixmap associated with the application.
503 505
504 \sa pixmap() setIcon() 506 \sa pixmap() setIcon()
505*/ 507*/
506const QPixmap& AppLnk::bigPixmap() const 508const QPixmap& AppLnk::bigPixmap() const
507{ 509{
508 if ( d->mPixmaps[1].isNull() ) { 510 if ( d->mPixmaps[1].isNull() ) {