summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/settingsimpl.cpp
authordrw <drw>2003-02-06 01:19:25 (UTC)
committer drw <drw>2003-02-06 01:19:25 (UTC)
commit79588befde53765db0a92977c6890a4d226096e7 (patch) (side-by-side diff)
tree83b6dd14c49733b9759fad04147bf0bee50793fe /noncore/settings/aqpkg/settingsimpl.cpp
parentbbb3690f12191763a407e6a0edd521113b3c25ac (diff)
downloadopie-79588befde53765db0a92977c6890a4d226096e7.zip
opie-79588befde53765db0a92977c6890a4d226096e7.tar.gz
opie-79588befde53765db0a92977c6890a4d226096e7.tar.bz2
Change all vector<> to QList<>. First step in removing dependency on libstdc++.
Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index c5a55d2..7541f0b 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -256,9 +256,11 @@ void SettingsImpl :: setupData()
// add servers
- vector<Server>::iterator it;
- for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it )
+ QString serverName;
+ QListIterator<Server> it( dataMgr->getServerList() );
+ for ( ; it.current(); ++it )
{
- if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS )
+ serverName = it.current()->getServerName();
+ if ( serverName == LOCAL_SERVER || serverName == LOCAL_IPKGS )
continue;
- servers->insertItem( it->getServerName() );
+ servers->insertItem( serverName );
}
@@ -267,5 +269,5 @@ void SettingsImpl :: setupData()
// add destinations
- vector<Destination>::iterator it2;
- for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 )
- destinations->insertItem( it2->getDestinationName() );
+ QListIterator<Destination> it2( dataMgr->getDestinationList() );
+ for ( ; it2.current(); ++it2 )
+ destinations->insertItem( it2.current()->getDestinationName() );
@@ -285,3 +287,3 @@ void SettingsImpl :: editServer( int sel )
currentSelectedServer = sel;
- vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
+ Server *s = dataMgr->getServer( servers->currentText() );
serverName = s->getServerName();
@@ -304,4 +306,4 @@ void SettingsImpl :: removeServer()
changed = true;
- vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
- dataMgr->getServerList().erase( s );
+ Server *s = dataMgr->getServer( servers->currentText() );
+ dataMgr->getServerList().removeRef( s );
servers->removeItem( currentSelectedServer );
@@ -316,3 +318,3 @@ void SettingsImpl :: changeServerDetails()
{
- vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
+ Server *s = dataMgr->getServer( servers->currentText() );
@@ -340,4 +342,4 @@ void SettingsImpl :: changeServerDetails()
Server s( newName, serverurl->text() );
- dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) );
- dataMgr->getServerList().end()->setActive( active->isChecked() );
+ dataMgr->getServerList().append( new Server( newName, serverurl->text() ) );
+ dataMgr->getServerList().last()->setActive( active->isChecked() );
servers->insertItem( newName );
@@ -353,3 +355,3 @@ void SettingsImpl :: editDestination( int sel )
currentSelectedDestination = sel;
- vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
+ Destination *d = dataMgr->getDestination( destinations->currentText() );
destinationName = d->getDestinationName();
@@ -372,4 +374,4 @@ void SettingsImpl :: removeDestination()
changed = true;
- vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
- dataMgr->getDestinationList().erase( d );
+ Destination *d = dataMgr->getDestination( destinations->currentText() );
+ dataMgr->getDestinationList().removeRef( d );
destinations->removeItem( currentSelectedDestination );
@@ -389,3 +391,3 @@ void SettingsImpl :: changeDestinationDetails()
{
- vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
+ Destination *d = dataMgr->getDestination( destinations->currentText() );
@@ -413,3 +415,3 @@ void SettingsImpl :: changeDestinationDetails()
{
- dataMgr->getDestinationList().push_back( Destination( newName, destinationurl->text() ) );
+ dataMgr->getDestinationList().append( new Destination( newName, destinationurl->text() ) );
destinations->insertItem( newName );