author | tille <tille> | 2002-05-12 12:49:58 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-12 12:49:58 (UTC) |
commit | 98229e01acc37562671b546a8aa955415a0f5843 (patch) (unidiff) | |
tree | 5e08cfe4b8526591d636c8e7ada5374ecc29a828 /noncore/unsupported/oipkg/pmipkg.cpp | |
parent | c1cc5edca5d6d71350f841892fb7828f7be9ed9f (diff) | |
download | opie-98229e01acc37562671b546a8aa955415a0f5843.zip opie-98229e01acc37562671b546a8aa955415a0f5843.tar.gz opie-98229e01acc37562671b546a8aa955415a0f5843.tar.bz2 |
fixed install/remove segfault
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 0401a5b..30777c2 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -241,6 +241,7 @@ void PmIpkg::commit() | |||
241 | runwindow->show(); | 241 | runwindow->show(); |
242 | } | 242 | } |
243 | installDialog->close(); | 243 | installDialog->close(); |
244 | delete installDialog; | ||
244 | out(tr("\nAll done.")); | 245 | out(tr("\nAll done.")); |
245 | } | 246 | } |
246 | 247 | ||
@@ -268,15 +269,15 @@ void PmIpkg::remove() | |||
268 | runwindow->progress->setProgress( 1 ); | 269 | runwindow->progress->setProgress( 1 ); |
269 | linkOpp = removeLink; | 270 | linkOpp = removeLink; |
270 | to_remove.at(i)->processed(); | 271 | to_remove.at(i)->processed(); |
271 | pvDebug(4,"link "+QString::number(i)); | 272 | pvDebug(3,"link "+QString::number(i)); |
272 | if ( to_remove.at(i)->link() ) | 273 | if ( to_remove.at(i)->link() ) |
273 | processFileList( fileList, to_remove.at(i)->dest() ); | 274 | processFileList( fileList, to_remove.at(i)->dest() ); |
274 | pvDebug(4,"take "+QString::number(i)); | 275 | //pvDebug(3,"take "+QString::number(i)+" of "+QString::number(to_remove.count())); |
275 | to_remove.take( i ); | 276 | //if ( to_remove.at(i) ) to_remove.take( i ); |
276 | 277 | ||
277 | out("\n"); | 278 | out("\n"); |
278 | }else{ | 279 | }else{ |
279 | out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); | 280 | out(tr("Error while removing ")+to_remove.at(i)->name()+"\n"); |
280 | if ( to_remove.at(i)->link() ) | 281 | if ( to_remove.at(i)->link() ) |
281 | processFileList( fileList, to_remove.at(i)->dest() ); | 282 | processFileList( fileList, to_remove.at(i)->dest() ); |
282 | } | 283 | } |
@@ -303,7 +304,7 @@ void PmIpkg::install() | |||
303 | linkOpp = createLink; | 304 | linkOpp = createLink; |
304 | if ( to_install.at(i)->link() ) | 305 | if ( to_install.at(i)->link() ) |
305 | makeLinks( to_install.at(i) ); | 306 | makeLinks( to_install.at(i) ); |
306 | to_install.take( i ); | 307 | // to_install.take( i ); |
307 | out("\n"); | 308 | out("\n"); |
308 | }else{ | 309 | }else{ |
309 | out(tr("Error while installing")+to_install.at(i)->name()+"\n"); | 310 | out(tr("Error while installing")+to_install.at(i)->name()+"\n"); |
@@ -360,11 +361,6 @@ void PmIpkg::show() | |||
360 | runwindow->show(); | 361 | runwindow->show(); |
361 | } | 362 | } |
362 | runwindow->outPut->setText(""); | 363 | runwindow->outPut->setText(""); |
363 | //showButtons(b); | ||
364 | //if ( !b ) | ||
365 | // runwindow->progress->hide(); | ||
366 | // else | ||
367 | // runwindow->progress->show(); | ||
368 | } | 364 | } |
369 | 365 | ||
370 | void PmIpkg::installFile(const QString &fileName, const QString &dest) | 366 | void PmIpkg::installFile(const QString &fileName, const QString &dest) |
@@ -393,3 +389,9 @@ void PmIpkg::removeFile(const QString &fileName, const QString &dest) | |||
393 | delete p; | 389 | delete p; |
394 | } | 390 | } |
395 | 391 | ||
392 | |||
393 | void PmIpkg::clearLists() | ||
394 | { | ||
395 | to_remove.clear(); | ||
396 | to_install.clear(); | ||
397 | } | ||