Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index fa46543..6e63fca 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -481,39 +481,38 @@ void LauncherIconView::hideOrShowItems(bool resort) | |||
481 | if ( resort && !autoArrange() ) | 481 | if ( resort && !autoArrange() ) |
482 | sort(); | 482 | sort(); |
483 | } | 483 | } |
484 | 484 | ||
485 | bool LauncherIconView::removeLink(const QString& linkfile) | 485 | bool LauncherIconView::removeLink(const QString& linkfile) |
486 | { | 486 | { |
487 | LauncherItem* item = (LauncherItem*)firstItem(); | 487 | LauncherItem* item = (LauncherItem*)firstItem(); |
488 | AppLnk* l; | 488 | AppLnk* l; |
489 | bool did = FALSE; | 489 | bool did = FALSE; |
490 | DocLnk dl(linkfile); | 490 | DocLnk dl(linkfile); |
491 | while (item) { | 491 | while (item) { |
492 | l = item->appLnk(); | 492 | l = item->appLnk(); |
493 | if ( l->linkFileKnown() && l->linkFile() == linkfile | 493 | if ( ( l->linkFileKnown() && ( l->linkFile() == linkfile )) |
494 | || l->fileKnown() && ( | 494 | || ( l->fileKnown() && ( l->file() == linkfile )) |
495 | l->file() == linkfile | 495 | || ( dl.fileKnown() && l->fileKnown() && ( dl.file() == l->file() )) ) { |
496 | || dl.isValid() && dl.file() == l->file() ) ) { | ||
497 | delete item; | 496 | delete item; |
498 | did = TRUE; | 497 | did = TRUE; |
499 | } | 498 | } |
500 | item = (LauncherItem*)item->nextItem(); | 499 | item = (LauncherItem*)item->nextItem(); |
501 | } | 500 | } |
502 | QListIterator<AppLnk> it(hidden); | 501 | QListIterator<AppLnk> it(hidden); |
503 | while ((l=it.current())) { | 502 | while ((l=it.current())) { |
504 | ++it; | 503 | ++it; |
505 | if ( l->linkFileKnown() && l->linkFile() == linkfile | 504 | if ( ( l->linkFileKnown() && ( l->linkFile() == linkfile )) |
506 | || l->file() == linkfile | 505 | || ( l->file() == linkfile ) |
507 | || dl.isValid() && dl.file() == l->file() ) { | 506 | || ( dl.fileKnown() && ( dl.file() == l->file() )) ) { |
508 | hidden.removeRef(l); | 507 | hidden.removeRef(l); |
509 | did = TRUE; | 508 | did = TRUE; |
510 | } | 509 | } |
511 | } | 510 | } |
512 | return did; | 511 | return did; |
513 | } | 512 | } |
514 | 513 | ||
515 | static QString docLinkInfo(const Categories& cats, DocLnk* doc) | 514 | static QString docLinkInfo(const Categories& cats, DocLnk* doc) |
516 | { | 515 | { |
517 | QString contents; | 516 | QString contents; |
518 | 517 | ||
519 | QFileInfo fi( doc->file() ); | 518 | QFileInfo fi( doc->file() ); |