summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 318b26d..3ce7960 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -78,21 +78,27 @@ void NetworkPackageManager :: timerEvent ( QTimerEvent * )
78// progressDlg->hide(); 78// progressDlg->hide();
79} 79}
80 80
81void NetworkPackageManager :: updateData() 81void NetworkPackageManager :: updateData()
82{ 82{
83 serversList->clear(); 83 serversList->clear();
84 packagesList->clear(); 84 packagesList->clear();
85 85
86
86 vector<Server>::iterator it; 87 vector<Server>::iterator it;
87 int activeItem = -1; 88 int activeItem = -1;
88 int i; 89 int i;
89 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i ) 90 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i )
90 { 91 {
92 if ( !it->isServerActive() )
93 {
94 i--;
95 continue;
96 }
91 serversList->insertItem( it->getServerName() ); 97 serversList->insertItem( it->getServerName() );
92 if ( it->getServerName() == currentlySelectedServer ) 98 if ( it->getServerName() == currentlySelectedServer )
93 activeItem = i; 99 activeItem = i;
94 } 100 }
95 101
96 // set selected server to be active server 102 // set selected server to be active server
97 if ( activeItem != -1 ) 103 if ( activeItem != -1 )
98 serversList->setCurrentItem( activeItem ); 104 serversList->setCurrentItem( activeItem );