author | andyq <andyq> | 2002-11-21 20:16:40 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-21 20:16:40 (UTC) |
commit | 2185394da06d32a3655e71ec022da202477350e7 (patch) (side-by-side diff) | |
tree | b266ddecaa44a1fef5229bb0525c990d5e7cc51a | |
parent | 6d302b82aab909da59852d99a31bcc7726ba9f34 (diff) | |
download | opie-2185394da06d32a3655e71ec022da202477350e7.zip opie-2185394da06d32a3655e71ec022da202477350e7.tar.gz opie-2185394da06d32a3655e71ec022da202477350e7.tar.bz2 |
Re-applied patch for gcc3.2
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 27 | ||||
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 6 | ||||
-rw-r--r-- | noncore/settings/aqpkg/global.h | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/letterpushbutton.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 13 |
10 files changed, 29 insertions, 33 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index e7fb75a..96c28c0 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp @@ -38,36 +38,34 @@ DataManager::DataManager() DataManager::~DataManager() { } -Server *DataManager :: getServer( const char *name ) +vector<Server>::iterator DataManager :: getServer( const char *name ) { - Server *s = 0; vector<Server>::iterator it = serverList.begin(); - while ( it != serverList.end() && s == 0 ) + while ( it != serverList.end() ) { if ( it->getServerName() == name ) - s = &(*it); + return it; ++it; } - return s; + return serverList.end(); } -Destination *DataManager :: getDestination( const char *name ) +vector<Destination>::iterator DataManager :: getDestination( const char *name ) { - Destination *d = 0; vector<Destination>::iterator it = destList.begin(); - while ( it != destList.end() && d == 0 ) + while ( it != destList.end() ) { if ( it->getDestinationName() == name ) - d = &(*it); + return it; ++it; } - return d; + return destList.end(); } void DataManager :: loadServers() { @@ -149,13 +147,8 @@ void DataManager :: loadServers() } } fclose( fp ); - cout << "httpProxy = " << httpProxy << endl; - cout << "ftpProxy = " << ftpProxy << endl; - cout << "proxyUsername = " << proxyUsername << endl; - cout << "proxyPassword = " << proxyPassword << endl; - reloadServerData( ); } void DataManager :: reloadServerData( ) @@ -170,11 +163,11 @@ void DataManager :: reloadServerData( ) // The other servers files hold the contents of the server package list if ( it->getServerName() == LOCAL_SERVER ) it->readStatusFile( destList ); else if ( it->getServerName() == LOCAL_IPKGS ) - it->readLocalIpks( getServer( LOCAL_SERVER ) ); + it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); else - it->readPackageFile( getServer( LOCAL_SERVER ) ); + it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); } } void DataManager :: writeOutIpkgConf() diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index 14b0b2f..41833df 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h @@ -42,14 +42,14 @@ public: void setActiveServer( const QString &act ) { activeServer = act; } QString &getActiveServer( ) { return activeServer; } - Server *getLocalServer() { return getServer( LOCAL_SERVER ); } + Server *getLocalServer() { return &( *getServer( LOCAL_SERVER ) ); } vector<Server> &getServerList() { return serverList; } - Server *getServer( const char *name ); + vector<Server>::iterator getServer( const char *name ); vector<Destination> &getDestinationList() { return destList; } - Destination *getDestination( const char *name ); + vector<Destination>::iterator getDestination( const char *name ); void loadServers(); void reloadServerData( ); diff --git a/noncore/settings/aqpkg/global.h b/noncore/settings/aqpkg/global.h index fcec643..ddfb3ac 100644 --- a/noncore/settings/aqpkg/global.h +++ b/noncore/settings/aqpkg/global.h @@ -17,9 +17,9 @@ #ifndef __GLOBAL_H #define __GLOBAL_H -#define VERSION_TEXT "AQPkg Version 1.3" +#define VERSION_TEXT "AQPkg Version 1.4" // Uncomment the below line to run on a Linux box rather than a Zaurus // box this allows you to change where root is, and where to load config files from // #define X86 diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index b297437..db9a259 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp @@ -164,9 +164,9 @@ void InstallDlgImpl :: installSelected() } else { output->setText( "" ); - Destination *d = dataMgr->getDestination( destination->currentText() ); + vector<Destination>::iterator d = dataMgr->getDestination( destination->currentText() ); QString dest = d->getDestinationName(); QString destDir = d->getDestinationPath(); int instFlags = flags; if ( d->linkToRoot() ) diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 452eca3..8de3c48 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp @@ -15,8 +15,9 @@ * * ***************************************************************************/ #include <fstream> +#include <iostream> using namespace std; #include <stdio.h> #include <unistd.h> diff --git a/noncore/settings/aqpkg/letterpushbutton.cpp b/noncore/settings/aqpkg/letterpushbutton.cpp index afe25d8..ca96c6c 100644 --- a/noncore/settings/aqpkg/letterpushbutton.cpp +++ b/noncore/settings/aqpkg/letterpushbutton.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ #include "letterpushbutton.h" -LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name=0 ) +LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name ) : QPushButton( text, parent, name ) { connect( this, SIGNAL(released()), this, SLOT(released_emmitor()) ); } diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 0141359..3ddc582 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp @@ -15,8 +15,9 @@ * * ***************************************************************************/ #include <iostream> +using namespace std; #include <qmenubar.h> #include <qpopupmenu.h> #include <qmessagebox.h> @@ -50,9 +51,9 @@ MainWindow :: MainWindow( QWidget *p, char *name ) edit->insertItem( "&Find", this, SLOT(searchForPackage()), Qt::CTRL+Qt::Key_I ); edit->insertItem( "Find &Next", this, SLOT(repeatSearchForPackage()), Qt::CTRL+Qt::Key_N ); filter = new QPopupMenu( this ); - mnuShowUninstalledPkgsId = filter->insertItem( "Show &Uninstalled Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); + mnuShowUninstalledPkgsId = filter->insertItem( "Show &Non-Installed Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); mnuShowInstalledPkgsId = filter->insertItem( "Show In&stalled Packages", this, SLOT(filterInstalledPackages()), Qt::CTRL+Qt::Key_S ); mnuShowUpgradedPkgsId = filter->insertItem( "Show U&pdated Packages", this, SLOT(filterUpgradedPackages()), Qt::CTRL+Qt::Key_P ); filter->insertSeparator(); mnuFilterByCategory = filter->insertItem( "Filter By &Category", this, SLOT(filterCategory()), Qt::CTRL+Qt::Key_C ); diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index d9e62b6..79a380e 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp @@ -216,9 +216,9 @@ void NetworkPackageManager :: serverSelected( int ) cfg.setGroup( "settings" ); cfg.writeEntry( "selectedServer", currentlySelectedServer ); #endif - Server *s = dataMgr->getServer( serverName ); + vector<Server>::iterator s = dataMgr->getServer( serverName ); vector<Package> &list = s->getPackageList(); vector<Package>::iterator it; for ( it = list.begin() ; it != list.end() ; ++it ) @@ -611,9 +611,9 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) if ( pos > 0 ) name.truncate( pos - 1 ); // Get package - Server *s = dataMgr->getServer( serversList->currentText() ); + vector<Server>::iterator s = dataMgr->getServer( serversList->currentText() ); Package *p = s->getPackage( name ); // If the package has a filename then it is a local file if ( p->isPackageStoredLocally() ) diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 58407d5..2cb0533 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp @@ -79,9 +79,9 @@ void Server :: readStatusFile( vector<Destination> &destList ) installingToRoot = true; } packageFile = path + "usr/lib/ipkg/status"; - readPackageFile( 0, false, installingToRoot, dit ); + readPackageFile( 0, false, installingToRoot, &( *dit ) ); } // Ensure that the root status file is read if ( !rootRead ) diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index a18a178..9dd2206 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp @@ -15,8 +15,9 @@ * * ***************************************************************************/ #include <fstream> +#include <algorithm> using namespace std; #include <qlistbox.h> #include <qlineedit.h> @@ -90,9 +91,9 @@ void SettingsImpl :: setupData() void SettingsImpl :: editServer( int sel ) { currentSelectedServer = sel; - Server *s = dataMgr->getServer( servers->currentText() ); + vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); serverName = s->getServerName(); servername->setText( s->getServerName() ); serverurl->setText( s->getServerUrl() ); active->setChecked( s->isServerActive() ); @@ -109,9 +110,9 @@ void SettingsImpl :: newServer() void SettingsImpl :: removeServer() { changed = true; - Server *s = dataMgr->getServer( servers->currentText() ); + vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); dataMgr->getServerList().erase( s ); servers->removeItem( currentSelectedServer ); } @@ -121,9 +122,9 @@ void SettingsImpl :: changeServerDetails() QString newName = servername->text(); if ( !newserver ) { - Server *s = dataMgr->getServer( serverName ); + vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); // Update url s->setServerUrl( serverurl->text() ); s->setActive( active->isChecked() ); @@ -158,9 +159,9 @@ void SettingsImpl :: changeServerDetails() void SettingsImpl :: editDestination( int sel ) { currentSelectedDestination = sel; - Destination *d = dataMgr->getDestination( destinations->currentText() ); + vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); destinationName = d->getDestinationName(); destinationname->setText( d->getDestinationName() ); destinationurl->setText( d->getDestinationPath() ); linkToRoot->setChecked( d->linkToRoot() ); @@ -177,9 +178,9 @@ void SettingsImpl :: newDestination() void SettingsImpl :: removeDestination() { changed = true; - Destination *d = dataMgr->getDestination( destinations->currentText() ); + vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); dataMgr->getDestinationList().erase( d ); destinations->removeItem( currentSelectedDestination ); } @@ -194,9 +195,9 @@ void SettingsImpl :: changeDestinationDetails() QString newName = destinationname->text(); if ( !newdestination ) { - Destination *d = dataMgr->getDestination( destinationName ); + vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); // Update url d->setDestinationPath( destinationurl->text() ); d->linkToRoot( linkToRoot->isChecked() ); |