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 | |
parent | c1cc5edca5d6d71350f841892fb7828f7be9ed9f (diff) | |
download | opie-98229e01acc37562671b546a8aa955415a0f5843.zip opie-98229e01acc37562671b546a8aa955415a0f5843.tar.gz opie-98229e01acc37562671b546a8aa955415a0f5843.tar.bz2 |
fixed install/remove segfault
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 19 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 22 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 2 |
4 files changed, 17 insertions, 27 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index a23c900..1c56aae 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -260,2 +260,3 @@ void MainWindow::runIpkg() | |||
260 | ipkg->commit(); | 260 | ipkg->commit(); |
261 | ipkg->clearLists(); | ||
261 | // ##### If we looked in the list of files, we could send out accurate | 262 | // ##### If we looked in the list of files, we could send out accurate |
@@ -422,19 +423,4 @@ void MainWindow::setDocument(const QString &fileName) | |||
422 | { | 423 | { |
423 | installFile(fileName); | ||
424 | // ##### If we looked in the list of files, we could send out accurate | ||
425 | // ##### messages. But we don't bother yet, and just do an "all". | ||
426 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | ||
427 | QString lf = QString::null; | ||
428 | e << lf; | ||
429 | // displayList(); | ||
430 | exit; | ||
431 | } | ||
432 | |||
433 | void MainWindow::installFile(const QString &fileName) | ||
434 | { | ||
435 | pvDebug(3, "MainWindow::installFile "+fileName); | ||
436 | if ( !QFile::exists( fileName ) ) return; | 424 | if ( !QFile::exists( fileName ) ) return; |
437 | ipkg->installFile( fileName ); | 425 | ipkg->installFile( fileName ); |
438 | // ##### If we looked in the list of files, we could send out accurate | ||
439 | // ##### messages. But we don't bother yet, and just do an "all". | ||
440 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 426 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
@@ -442,5 +428,6 @@ void MainWindow::installFile(const QString &fileName) | |||
442 | e << lf; | 428 | e << lf; |
443 | displayList(); | 429 | exit; |
444 | } | 430 | } |
445 | 431 | ||
432 | |||
446 | void MainWindow::makeChannel() | 433 | void MainWindow::makeChannel() |
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h index 7c93dad..ce3e761 100644 --- a/noncore/unsupported/oipkg/mainwindow.h +++ b/noncore/unsupported/oipkg/mainwindow.h | |||
@@ -66,3 +66,2 @@ private: | |||
66 | void setSubSections(); | 66 | void setSubSections(); |
67 | void installFile(const QString &); | ||
68 | bool updateIcon; | 67 | bool updateIcon; |
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 | |||
@@ -243,2 +243,3 @@ void PmIpkg::commit() | |||
243 | installDialog->close(); | 243 | installDialog->close(); |
244 | delete installDialog; | ||
244 | out(tr("\nAll done.")); | 245 | out(tr("\nAll done.")); |
@@ -270,7 +271,7 @@ void PmIpkg::remove() | |||
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 | ||
@@ -278,3 +279,3 @@ void PmIpkg::remove() | |||
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() ) |
@@ -305,3 +306,3 @@ void PmIpkg::install() | |||
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"); |
@@ -362,7 +363,2 @@ void PmIpkg::show() | |||
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 | } |
@@ -395 +391,7 @@ void PmIpkg::removeFile(const QString &fileName, const QString &dest) | |||
395 | 391 | ||
392 | |||
393 | void PmIpkg::clearLists() | ||
394 | { | ||
395 | to_remove.clear(); | ||
396 | to_install.clear(); | ||
397 | } | ||
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index c543304..d53a74d 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h | |||
@@ -30,2 +30,4 @@ public: | |||
30 | void show(); | 30 | void show(); |
31 | /** No descriptions */ | ||
32 | void clearLists(); | ||
31 | 33 | ||