-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 29 | ||||
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 8 | ||||
-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 | 5 | ||||
-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 | 23 |
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() | |||
41 | 41 | ||
42 | Server *DataManager :: getServer( const char *name ) | 42 | vector<Server>::iterator DataManager :: getServer( const char *name ) |
43 | { | 43 | { |
44 | Server *s = 0; | 44 | vector<Server>::iterator it = serverList.begin(); |
45 | vector<Server>::iterator it = serverList.begin(); | 45 | while ( it != serverList.end() ) |
46 | while ( it != serverList.end() && s == 0 ) | ||
47 | { | 46 | { |
48 | if ( it->getServerName() == name ) | 47 | if ( it->getServerName() == name ) |
49 | s = &(*it); | 48 | return it; |
50 | 49 | ||
@@ -53,13 +52,12 @@ Server *DataManager :: getServer( const char *name ) | |||
53 | 52 | ||
54 | return s; | 53 | return serverList.end(); |
55 | } | 54 | } |
56 | 55 | ||
57 | Destination *DataManager :: getDestination( const char *name ) | 56 | vector<Destination>::iterator DataManager :: getDestination( const char *name ) |
58 | { | 57 | { |
59 | Destination *d = 0; | ||
60 | vector<Destination>::iterator it = destList.begin(); | 58 | vector<Destination>::iterator it = destList.begin(); |
61 | while ( it != destList.end() && d == 0 ) | 59 | while ( it != destList.end() ) |
62 | { | 60 | { |
63 | if ( it->getDestinationName() == name ) | 61 | if ( it->getDestinationName() == name ) |
64 | d = &(*it); | 62 | return it; |
65 | 63 | ||
@@ -68,3 +66,3 @@ Destination *DataManager :: getDestination( const char *name ) | |||
68 | 66 | ||
69 | return d; | 67 | return destList.end(); |
70 | } | 68 | } |
@@ -152,7 +150,2 @@ void DataManager :: loadServers() | |||
152 | 150 | ||
153 | cout << "httpProxy = " << httpProxy << endl; | ||
154 | cout << "ftpProxy = " << ftpProxy << endl; | ||
155 | cout << "proxyUsername = " << proxyUsername << endl; | ||
156 | cout << "proxyPassword = " << proxyPassword << endl; | ||
157 | |||
158 | reloadServerData( ); | 151 | reloadServerData( ); |
@@ -173,5 +166,5 @@ void DataManager :: reloadServerData( ) | |||
173 | else if ( it->getServerName() == LOCAL_IPKGS ) | 166 | else if ( it->getServerName() == LOCAL_IPKGS ) |
174 | it->readLocalIpks( getServer( LOCAL_SERVER ) ); | 167 | it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); |
175 | else | 168 | else |
176 | it->readPackageFile( getServer( LOCAL_SERVER ) ); | 169 | it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); |
177 | } | 170 | } |
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: | |||
40 | DataManager(); | 40 | DataManager(); |
41 | ~DataManager(); | 41 | ~DataManager(); |
42 | 42 | ||
@@ -45,8 +45,8 @@ public: | |||
45 | 45 | ||
46 | Server *getLocalServer() { return getServer( LOCAL_SERVER ); } | 46 | Server *getLocalServer() { return &( *getServer( LOCAL_SERVER ) ); } |
47 | vector<Server> &getServerList() { return serverList; } | 47 | vector<Server> &getServerList() { return serverList; } |
48 | Server *getServer( const char *name ); | 48 | vector<Server>::iterator getServer( const char *name ); |
49 | 49 | ||
50 | vector<Destination> &getDestinationList() { return destList; } | 50 | vector<Destination> &getDestinationList() { return destList; } |
51 | Destination *getDestination( const char *name ); | 51 | vector<Destination>::iterator getDestination( const char *name ); |
52 | 52 | ||
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 @@ | |||
20 | 20 | ||
21 | #define VERSION_TEXT "AQPkg Version 1.3" | 21 | #define VERSION_TEXT "AQPkg Version 1.4" |
22 | 22 | ||
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() | |||
167 | output->setText( "" ); | 167 | output->setText( "" ); |
168 | Destination *d = dataMgr->getDestination( destination->currentText() ); | 168 | vector<Destination>::iterator d = dataMgr->getDestination( destination->currentText() ); |
169 | QString dest = d->getDestinationName(); | 169 | 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 @@ | |||
18 | #include <fstream> | 18 | #include <fstream> |
19 | #include <iostream> | ||
19 | using namespace std; | 20 | 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 @@ | |||
19 | 19 | ||
20 | LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name=0 ) | 20 | LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name ) |
21 | : QPushButton( text, parent, name ) | 21 | : 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 @@ | |||
18 | #include <iostream> | 18 | #include <iostream> |
19 | using namespace std; | ||
19 | 20 | ||
@@ -53,3 +54,3 @@ MainWindow :: MainWindow( QWidget *p, char *name ) | |||
53 | filter = new QPopupMenu( this ); | 54 | filter = new QPopupMenu( this ); |
54 | mnuShowUninstalledPkgsId = filter->insertItem( "Show &Uninstalled Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); | 55 | mnuShowUninstalledPkgsId = filter->insertItem( "Show &Non-Installed Packages", this, SLOT(filterUninstalledPackages()), Qt::CTRL+Qt::Key_U ); |
55 | mnuShowInstalledPkgsId = filter->insertItem( "Show In&stalled Packages", this, SLOT(filterInstalledPackages()), Qt::CTRL+Qt::Key_S ); | 56 | mnuShowInstalledPkgsId = filter->insertItem( "Show In&stalled Packages", this, SLOT(filterInstalledPackages()), Qt::CTRL+Qt::Key_S ); |
@@ -208,2 +209,2 @@ void MainWindow :: filterCategory() | |||
208 | } | 209 | } |
209 | } \ No newline at end of file | 210 | } |
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 ) | |||
219 | 219 | ||
220 | Server *s = dataMgr->getServer( serverName ); | 220 | vector<Server>::iterator s = dataMgr->getServer( serverName ); |
221 | 221 | ||
@@ -614,3 +614,3 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item ) | |||
614 | // Get package | 614 | // Get package |
615 | Server *s = dataMgr->getServer( serversList->currentText() ); | 615 | vector<Server>::iterator s = dataMgr->getServer( serversList->currentText() ); |
616 | Package *p = s->getPackage( name ); | 616 | 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 ) | |||
82 | packageFile = path + "usr/lib/ipkg/status"; | 82 | packageFile = path + "usr/lib/ipkg/status"; |
83 | readPackageFile( 0, false, installingToRoot, dit ); | 83 | readPackageFile( 0, false, installingToRoot, &( *dit ) ); |
84 | } | 84 | } |
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 @@ | |||
18 | #include <fstream> | 18 | #include <fstream> |
19 | #include <algorithm> | ||
19 | using namespace std; | 20 | using namespace std; |
@@ -93,3 +94,3 @@ void SettingsImpl :: editServer( int sel ) | |||
93 | currentSelectedServer = sel; | 94 | currentSelectedServer = sel; |
94 | Server *s = dataMgr->getServer( servers->currentText() ); | 95 | vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); |
95 | serverName = s->getServerName(); | 96 | serverName = s->getServerName(); |
@@ -111,6 +112,6 @@ void SettingsImpl :: removeServer() | |||
111 | { | 112 | { |
112 | changed = true; | 113 | changed = true; |
113 | Server *s = dataMgr->getServer( servers->currentText() ); | 114 | vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); |
114 | dataMgr->getServerList().erase( s ); | 115 | dataMgr->getServerList().erase( s ); |
115 | servers->removeItem( currentSelectedServer ); | 116 | servers->removeItem( currentSelectedServer ); |
116 | } | 117 | } |
@@ -124,3 +125,3 @@ void SettingsImpl :: changeServerDetails() | |||
124 | { | 125 | { |
125 | Server *s = dataMgr->getServer( serverName ); | 126 | vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); |
126 | 127 | ||
@@ -161,3 +162,3 @@ void SettingsImpl :: editDestination( int sel ) | |||
161 | currentSelectedDestination = sel; | 162 | currentSelectedDestination = sel; |
162 | Destination *d = dataMgr->getDestination( destinations->currentText() ); | 163 | vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); |
163 | destinationName = d->getDestinationName(); | 164 | destinationName = d->getDestinationName(); |
@@ -179,5 +180,5 @@ void SettingsImpl :: removeDestination() | |||
179 | { | 180 | { |
180 | changed = true; | 181 | changed = true; |
181 | Destination *d = dataMgr->getDestination( destinations->currentText() ); | 182 | vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); |
182 | dataMgr->getDestinationList().erase( d ); | 183 | dataMgr->getDestinationList().erase( d ); |
183 | destinations->removeItem( currentSelectedDestination ); | 184 | destinations->removeItem( currentSelectedDestination ); |
@@ -197,3 +198,3 @@ void SettingsImpl :: changeDestinationDetails() | |||
197 | { | 198 | { |
198 | Destination *d = dataMgr->getDestination( destinationName ); | 199 | vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); |
199 | 200 | ||