author | tille <tille> | 2002-05-12 12:07:14 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-12 12:07:14 (UTC) |
commit | 06e723cc7942af2691828e7fdc6a6ec47b44edab (patch) (unidiff) | |
tree | f96bd547911c4fdc2aa8db95bd6175ebae02b027 /noncore/unsupported/oipkg/pksettings.cpp | |
parent | 026a99ad2360a9abc2964cbdc3b71b49adcd66e6 (diff) | |
download | opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.zip opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.gz opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.bz2 |
fixed crash when remove dest
Diffstat (limited to 'noncore/unsupported/oipkg/pksettings.cpp') (more/less context) (ignore 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 | |||
@@ -166,18 +166,19 @@ void PackageManagerSettings::removeServer() | |||
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 | ||
@@ -351,12 +352,13 @@ bool PackageManagerSettings::readIpkgConfig(const QString& conffile) | |||
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; |