Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
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 | |||
@@ -17,4 +17,5 @@ | |||
17 | 17 | ||
18 | #include <fstream> | 18 | #include <fstream> |
19 | #include <algorithm> | ||
19 | using namespace std; | 20 | using namespace std; |
20 | 21 | ||
@@ -92,5 +93,5 @@ void SettingsImpl :: editServer( int sel ) | |||
92 | { | 93 | { |
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(); |
96 | servername->setText( s->getServerName() ); | 97 | servername->setText( s->getServerName() ); |
@@ -110,8 +111,8 @@ void SettingsImpl :: newServer() | |||
110 | void SettingsImpl :: removeServer() | 111 | 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 | } |
117 | 118 | ||
@@ -123,5 +124,5 @@ void SettingsImpl :: changeServerDetails() | |||
123 | if ( !newserver ) | 124 | if ( !newserver ) |
124 | { | 125 | { |
125 | Server *s = dataMgr->getServer( serverName ); | 126 | vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); |
126 | 127 | ||
127 | // Update url | 128 | // Update url |
@@ -160,5 +161,5 @@ void SettingsImpl :: editDestination( int sel ) | |||
160 | { | 161 | { |
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(); |
164 | destinationname->setText( d->getDestinationName() ); | 165 | destinationname->setText( d->getDestinationName() ); |
@@ -178,7 +179,7 @@ void SettingsImpl :: newDestination() | |||
178 | void SettingsImpl :: removeDestination() | 179 | 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 ); |
184 | } | 185 | } |
@@ -196,5 +197,5 @@ void SettingsImpl :: changeDestinationDetails() | |||
196 | if ( !newdestination ) | 197 | if ( !newdestination ) |
197 | { | 198 | { |
198 | Destination *d = dataMgr->getDestination( destinationName ); | 199 | vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); |
199 | 200 | ||
200 | // Update url | 201 | // Update url |