Diffstat (limited to 'noncore/unsupported/oipkg/pksettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp index 24c7beb..09975b0 100644 --- a/noncore/unsupported/oipkg/pksettings.cpp +++ b/noncore/unsupported/oipkg/pksettings.cpp | |||
@@ -160,30 +160,31 @@ void PackageManagerSettings::removeServer() | |||
160 | servers->removeItem(editedserver); | 160 | servers->removeItem(editedserver); |
161 | activeServers->removeItem(editedserver); | 161 | activeServers->removeItem(editedserver); |
162 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | 162 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); |
163 | servername->setEnabled(FALSE); | 163 | servername->setEnabled(FALSE); |
164 | serverurl->setEnabled(FALSE); | 164 | serverurl->setEnabled(FALSE); |
165 | changed = true; | 165 | changed = true; |
166 | } | 166 | } |
167 | 167 | ||
168 | void PackageManagerSettings::removeDestination() | 168 | void PackageManagerSettings::removeDestination() |
169 | { | 169 | { |
170 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | 170 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); |
171 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | 171 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); |
172 | destinationname->setText(destinations->text(editedserver)); | 172 | destinationname->setText(""); |
173 | destinationurl->setText(*destinationurlDic[editedserver]); | 173 | destinationurl->setText(""); |
174 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | 174 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); |
175 | destinations->removeItem(editeddestination); | 175 | destinations->removeItem(editeddestination); |
176 | activeDestination->removeItem(editeddestination); | 176 | activeDestination->removeItem(editeddestination); |
177 | activeLinkDestination->removeItem(editeddestination); | 177 | activeLinkDestination->removeItem(editeddestination); |
178 | editeddestination=0; | ||
178 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | 179 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); |
179 | destinationname->setEnabled(FALSE); | 180 | destinationname->setEnabled(FALSE); |
180 | destinationurl->setEnabled(FALSE); | 181 | destinationurl->setEnabled(FALSE); |
181 | changed = true; | 182 | changed = true; |
182 | } | 183 | } |
183 | 184 | ||
184 | void PackageManagerSettings::serverNameChanged(const QString& t) | 185 | void PackageManagerSettings::serverNameChanged(const QString& t) |
185 | { | 186 | { |
186 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | 187 | disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); |
187 | servers->changeItem( t, editedserver ); | 188 | servers->changeItem( t, editedserver ); |
188 | activeServers->changeItem( t, editedserver ); | 189 | activeServers->changeItem( t, editedserver ); |
189 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); | 190 | connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); |
@@ -345,24 +346,25 @@ void PackageManagerSettings::installationSettingSetName(const QString &name) | |||
345 | changed = true; | 346 | changed = true; |
346 | } | 347 | } |
347 | 348 | ||
348 | 349 | ||
349 | bool PackageManagerSettings::readIpkgConfig(const QString& conffile) | 350 | bool PackageManagerSettings::readIpkgConfig(const QString& conffile) |
350 | { | 351 | { |
351 | QFile conf(conffile); | 352 | QFile conf(conffile); |
352 | changed = false; | 353 | changed = false; |
353 | if ( conf.open(IO_ReadOnly) ) { | 354 | if ( conf.open(IO_ReadOnly) ) { |
354 | QTextStream s(&conf); | 355 | QTextStream s(&conf); |
355 | servers->clear(); | 356 | servers->clear(); |
356 | activeServers->clear(); | 357 | activeServers->clear(); |
358 | destinations->clear(); | ||
357 | activeDestination->clear(); | 359 | activeDestination->clear(); |
358 | activeLinkDestination->clear(); | 360 | activeLinkDestination->clear(); |
359 | serverurlDic.clear(); | 361 | serverurlDic.clear(); |
360 | destinationurlDic.clear(); | 362 | destinationurlDic.clear(); |
361 | ipkg_old=0; | 363 | ipkg_old=0; |
362 | int currentserver=0; | 364 | int currentserver=0; |
363 | while ( !s.atEnd() ) { | 365 | while ( !s.atEnd() ) { |
364 | QString l = s.readLine(); | 366 | QString l = s.readLine(); |
365 | QStringList token = QStringList::split(' ', l); | 367 | QStringList token = QStringList::split(' ', l); |
366 | if ( token[0] == "src" || token[0] == "#src" ) { | 368 | if ( token[0] == "src" || token[0] == "#src" ) { |
367 | currentserver=servers->count(); | 369 | currentserver=servers->count(); |
368 | serverurlDic.insert(servers->count(),new QString(token[2])); | 370 | serverurlDic.insert(servers->count(),new QString(token[2])); |