summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/settingsimpl.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp23
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
@@ -16,6 +16,7 @@
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <fstream> 18#include <fstream>
19#include <algorithm>
19using namespace std; 20using namespace std;
20 21
21#include <qlistbox.h> 22#include <qlistbox.h>
@@ -91,7 +92,7 @@ void SettingsImpl :: setupData()
91void SettingsImpl :: editServer( int sel ) 92void 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() );
97 serverurl->setText( s->getServerUrl() ); 98 serverurl->setText( s->getServerUrl() );
@@ -109,10 +110,10 @@ void SettingsImpl :: newServer()
109 110
110void SettingsImpl :: removeServer() 111void 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
118void SettingsImpl :: changeServerDetails() 119void SettingsImpl :: changeServerDetails()
@@ -122,7 +123,7 @@ void SettingsImpl :: changeServerDetails()
122 QString newName = servername->text(); 123 QString newName = servername->text();
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
128 s->setServerUrl( serverurl->text() ); 129 s->setServerUrl( serverurl->text() );
@@ -159,7 +160,7 @@ void SettingsImpl :: changeServerDetails()
159void SettingsImpl :: editDestination( int sel ) 160void 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() );
165 destinationurl->setText( d->getDestinationPath() ); 166 destinationurl->setText( d->getDestinationPath() );
@@ -177,9 +178,9 @@ void SettingsImpl :: newDestination()
177 178
178void SettingsImpl :: removeDestination() 179void 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}
185 186
@@ -195,7 +196,7 @@ void SettingsImpl :: changeDestinationDetails()
195 QString newName = destinationname->text(); 196 QString newName = destinationname->text();
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
201 d->setDestinationPath( destinationurl->text() ); 202 d->setDestinationPath( destinationurl->text() );