summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.cpp29
-rw-r--r--noncore/settings/aqpkg/datamgr.h8
-rw-r--r--noncore/settings/aqpkg/global.h2
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp2
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp1
-rw-r--r--noncore/settings/aqpkg/letterpushbutton.cpp2
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp5
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp4
-rw-r--r--noncore/settings/aqpkg/server.cpp2
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp23
10 files changed, 37 insertions, 41 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
@@ -41,10 +41,9 @@ 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 )
+ vector<Server>::iterator it = serverList.begin();
+ while ( it != serverList.end() )
{
if ( it->getServerName() == name )
- s = &(*it);
+ return it;
@@ -53,13 +52,12 @@ Server *DataManager :: getServer( const char *name )
- 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;
@@ -68,3 +66,3 @@ Destination *DataManager :: getDestination( const char *name )
- return d;
+ return destList.end();
}
@@ -152,7 +150,2 @@ void DataManager :: loadServers()
- cout << "httpProxy = " << httpProxy << endl;
- cout << "ftpProxy = " << ftpProxy << endl;
- cout << "proxyUsername = " << proxyUsername << endl;
- cout << "proxyPassword = " << proxyPassword << endl;
-
reloadServerData( );
@@ -173,5 +166,5 @@ void DataManager :: reloadServerData( )
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 ) ) );
}
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
@@ -40,3 +40,3 @@ public:
DataManager();
- ~DataManager();
+ ~DataManager();
@@ -45,8 +45,8 @@ public:
- 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 );
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
@@ -20,3 +20,3 @@
-#define VERSION_TEXT "AQPkg Version 1.3"
+#define VERSION_TEXT "AQPkg Version 1.4"
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
@@ -167,3 +167,3 @@ void InstallDlgImpl :: installSelected()
output->setText( "" );
- Destination *d = dataMgr->getDestination( destination->currentText() );
+ vector<Destination>::iterator d = dataMgr->getDestination( destination->currentText() );
QString dest = d->getDestinationName();
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
@@ -18,2 +18,3 @@
#include <fstream>
+#include <iostream>
using namespace std;
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
@@ -19,3 +19,3 @@
-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 )
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
@@ -18,2 +18,3 @@
#include <iostream>
+using namespace std;
@@ -53,3 +54,3 @@ MainWindow :: MainWindow( QWidget *p, char *name )
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 );
@@ -208,2 +209,2 @@ void MainWindow :: filterCategory()
}
-} \ No newline at end of file
+}
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
@@ -219,3 +219,3 @@ void NetworkPackageManager :: serverSelected( int )
- Server *s = dataMgr->getServer( serverName );
+ vector<Server>::iterator s = dataMgr->getServer( serverName );
@@ -614,3 +614,3 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
// Get package
- Server *s = dataMgr->getServer( serversList->currentText() );
+ vector<Server>::iterator s = dataMgr->getServer( serversList->currentText() );
Package *p = s->getPackage( name );
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
@@ -82,3 +82,3 @@ void Server :: readStatusFile( vector<Destination> &destList )
packageFile = path + "usr/lib/ipkg/status";
- readPackageFile( 0, false, installingToRoot, dit );
+ readPackageFile( 0, false, installingToRoot, &( *dit ) );
}
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
@@ -18,2 +18,3 @@
#include <fstream>
+#include <algorithm>
using namespace std;
@@ -93,3 +94,3 @@ void SettingsImpl :: editServer( int sel )
currentSelectedServer = sel;
- Server *s = dataMgr->getServer( servers->currentText() );
+ vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
serverName = s->getServerName();
@@ -111,6 +112,6 @@ void SettingsImpl :: removeServer()
{
- changed = true;
- Server *s = dataMgr->getServer( servers->currentText() );
- dataMgr->getServerList().erase( s );
- servers->removeItem( currentSelectedServer );
+ changed = true;
+ vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
+ dataMgr->getServerList().erase( s );
+ servers->removeItem( currentSelectedServer );
}
@@ -124,3 +125,3 @@ void SettingsImpl :: changeServerDetails()
{
- Server *s = dataMgr->getServer( serverName );
+ vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
@@ -161,3 +162,3 @@ void SettingsImpl :: editDestination( int sel )
currentSelectedDestination = sel;
- Destination *d = dataMgr->getDestination( destinations->currentText() );
+ vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
destinationName = d->getDestinationName();
@@ -179,5 +180,5 @@ void SettingsImpl :: removeDestination()
{
- changed = true;
- Destination *d = dataMgr->getDestination( destinations->currentText() );
- dataMgr->getDestinationList().erase( d );
+ changed = true;
+ vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
+ dataMgr->getDestinationList().erase( d );
destinations->removeItem( currentSelectedDestination );
@@ -197,3 +198,3 @@ void SettingsImpl :: changeDestinationDetails()
{
- Destination *d = dataMgr->getDestination( destinationName );
+ vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );