summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
authorzecke <zecke>2005-02-23 22:59:25 (UTC)
committer zecke <zecke>2005-02-23 22:59:25 (UTC)
commit729a178d1da1b8f80e4b1f6b0fc2c6a4cd15a403 (patch) (side-by-side diff)
tree968a422532f4596d2ab5530127e28cd948776778 /library/applnk.cpp
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 (limited to 'library/applnk.cpp') (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)
d = new AppLnkPrivate();
d->mCat = copy.d->mCat;
d->mCatList = copy.d->mCatList;
d->mPixmaps = copy.d->mPixmaps;
return *this;
}
/*!
protected internally to share code
should I document that at all?
I don't know the TT style for that
*/
const QPixmap& AppLnk::pixmap( int pos, int size ) const {
if ( d->mPixmaps[pos].isNull() ) {
AppLnk* that = (AppLnk*)this;
if ( mIconFile.isEmpty() ) {
MimeType mt(type());
that->d->mPixmaps[pos] = pos ? mt.bigPixmap() : mt.pixmap();
if ( that->d->mPixmaps[pos].isNull() )
that->d->mPixmaps[pos].convertFromImage(
Resource::loadImage("UnknownDocument")
.smoothScale( size, size ) );
return that->d->mPixmaps[pos];
}
+
QImage unscaledIcon = Resource::loadImage( that->mIconFile );
if ( unscaledIcon.isNull() ) {
// qDebug( "Cannot find icon: %s", that->mIconFile.latin1() );
that->d->mPixmaps[pos].convertFromImage(
Resource::loadImage("UnknownDocument")
.smoothScale( size, size ) );
} else {
that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
}
return that->d->mPixmaps[pos];
}
+
return d->mPixmaps[pos];
}
/*!
Returns a small pixmap associated with the application.
\sa bigPixmap() setIcon()
*/
const QPixmap& AppLnk::pixmap() const
{
if ( d->mPixmaps[0].isNull() ) {
return pixmap(AppLnkPrivate::Normal, smallSize );
}
return d->mPixmaps[0];
}
/*!
Returns a large pixmap associated with the application.
\sa pixmap() setIcon()
*/
const QPixmap& AppLnk::bigPixmap() const
{
if ( d->mPixmaps[1].isNull() ) {