Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 6ea619c..fb40d52 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -630,50 +630,48 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) | |||
630 | 630 | ||
631 | // Apply show only uninstalled packages filter | 631 | // Apply show only uninstalled packages filter |
632 | if ( showUninstalledPkgs && package->isInstalled() ) | 632 | if ( showUninstalledPkgs && package->isInstalled() ) |
633 | continue; | 633 | continue; |
634 | 634 | ||
635 | // Apply show only installed packages filter | 635 | // Apply show only installed packages filter |
636 | if ( showInstalledPkgs && !package->isInstalled() ) | 636 | if ( showInstalledPkgs && !package->isInstalled() ) |
637 | continue; | 637 | continue; |
638 | 638 | ||
639 | // Apply show only new installed packages filter | 639 | // Apply show only new installed packages filter |
640 | if ( showUpgradedPkgs ) | 640 | if ( showUpgradedPkgs ) |
641 | { | 641 | { |
642 | if ( !package->isInstalled() || | 642 | if ( !package->isInstalled() || !package->getNewVersionAvailable() ) |
643 | compareVersions( package->getInstalledVersion(), package->getVersion() ) != 1 ) | ||
644 | continue; | 643 | continue; |
645 | } | 644 | } |
646 | 645 | ||
647 | // Apply the section filter | 646 | // Apply the section filter |
648 | if ( categoryFilterEnabled && categoryFilter != "" ) | 647 | if ( categoryFilterEnabled && categoryFilter != "" ) |
649 | { | 648 | { |
650 | if ( package->getSection() == "" || categoryFilter.find( package->getSection().lower() ) == -1 ) | 649 | if ( package->getSection() == "" || categoryFilter.find( package->getSection().lower() ) == -1 ) |
651 | continue; | 650 | continue; |
652 | } | 651 | } |
653 | 652 | ||
654 | // If the local server, only display installed packages | 653 | // If the local server, only display installed packages |
655 | if ( serverName == LOCAL_SERVER && !package->isInstalled() ) | 654 | if ( serverName == LOCAL_SERVER && !package->isInstalled() ) |
656 | continue; | 655 | continue; |
657 | 656 | ||
658 | 657 | ||
659 | QCheckListItem *item = new QCheckListItem( packagesList, package->getPackageName(), | 658 | QCheckListItem *item = new QCheckListItem( packagesList, package->getPackageName(), |
660 | QCheckListItem::CheckBox ); | 659 | QCheckListItem::CheckBox ); |
661 | 660 | ||
662 | if ( package->isInstalled() ) | 661 | if ( package->isInstalled() ) |
663 | { | 662 | { |
664 | // If a different version of package is available, show update available icon | 663 | // If a different version of package is available, show update available icon |
665 | // Otherwise, show installed icon | 664 | // Otherwise, show installed icon |
666 | if ( package->getVersion() != package->getInstalledVersion() && | 665 | if ( package->getNewVersionAvailable()) |
667 | compareVersions( package->getInstalledVersion(), package->getVersion() ) == 1) | ||
668 | { | 666 | { |
669 | 667 | ||
670 | item->setPixmap( 0, updatedIcon ); | 668 | item->setPixmap( 0, updatedIcon ); |
671 | } | 669 | } |
672 | else | 670 | else |
673 | { | 671 | { |
674 | item->setPixmap( 0, installedIcon ); | 672 | item->setPixmap( 0, installedIcon ); |
675 | } | 673 | } |
676 | 674 | ||
677 | QString destName = ""; | 675 | QString destName = ""; |
678 | if ( package->getLocalPackage() ) | 676 | if ( package->getLocalPackage() ) |
679 | { | 677 | { |