-rw-r--r-- | library/applnk.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp index 00030e8..4adf1bd 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp | |||
@@ -470,17 +470,17 @@ const QPixmap& AppLnk::pixmap( int pos, int size ) const { | |||
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]; |
@@ -1102,16 +1102,17 @@ void AppLnkSet::findChildren(const QString &dr, const QString& typ, const QStrin | |||
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | const QFileInfoList *list = dir.entryInfoList(); | 1104 | const QFileInfoList *list = dir.entryInfoList(); |
1105 | if ( list ) { | 1105 | if ( list ) { |
1106 | QFileInfo* fi; | 1106 | QFileInfo* fi; |
1107 | bool cadded=FALSE; | 1107 | bool cadded=FALSE; |
1108 | for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) { | 1108 | for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) { |
1109 | QString bn = fi->fileName(); | 1109 | QString bn = fi->fileName(); |
1110 | // qDebug("findChildren "+bn); | ||
1110 | if ( bn[0] != '.' && bn != "CVS" ) { | 1111 | if ( bn[0] != '.' && bn != "CVS" ) { |
1111 | if ( fi->isDir() ) { | 1112 | if ( fi->isDir() ) { |
1112 | QString c = typ.isNull() ? bn : typ+"/"+bn; | 1113 | QString c = typ.isNull() ? bn : typ+"/"+bn; |
1113 | QString d = typNameLocal.isNull() ? bn : typNameLocal+"/"+bn; | 1114 | QString d = typNameLocal.isNull() ? bn : typNameLocal+"/"+bn; |
1114 | findChildren(fi->filePath(), c, d, depth ); | 1115 | findChildren(fi->filePath(), c, d, depth ); |
1115 | } else { | 1116 | } else { |
1116 | if ( fi->extension(FALSE) == "desktop" ) { | 1117 | if ( fi->extension(FALSE) == "desktop" ) { |
1117 | AppLnk* app = new AppLnk( fi->filePath() ); | 1118 | AppLnk* app = new AppLnk( fi->filePath() ); |
@@ -1284,17 +1285,16 @@ DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) : | |||
1284 | mimeFilters.append( QRegExp(*it, FALSE, TRUE) ); | 1285 | mimeFilters.append( QRegExp(*it, FALSE, TRUE) ); |
1285 | 1286 | ||
1286 | findChildren(directory, mimeFilters, reference); | 1287 | findChildren(directory, mimeFilters, reference); |
1287 | 1288 | ||
1288 | const QList<DocLnk> &list = children(); | 1289 | const QList<DocLnk> &list = children(); |
1289 | for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) { | 1290 | for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) { |
1290 | reference.remove( (*it)->file() ); | 1291 | reference.remove( (*it)->file() ); |
1291 | } | 1292 | } |
1292 | |||
1293 | for ( QDictIterator<void> dit(reference); dit.current(); ++dit ) { | 1293 | for ( QDictIterator<void> dit(reference); dit.current(); ++dit ) { |
1294 | if ( dit.current() == (void*)2 ) { | 1294 | if ( dit.current() == (void*)2 ) { |
1295 | // Unreferenced, make an unwritten link | 1295 | // Unreferenced, make an unwritten link |
1296 | DocLnk* dl = new DocLnk; | 1296 | DocLnk* dl = new DocLnk; |
1297 | QFileInfo fi( dit.currentKey() ); | 1297 | QFileInfo fi( dit.currentKey() ); |
1298 | dl->setFile(fi.filePath()); | 1298 | dl->setFile(fi.filePath()); |
1299 | dl->setName(fi.baseName()); | 1299 | dl->setName(fi.baseName()); |
1300 | // #### default to current path? | 1300 | // #### default to current path? |