Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 75f93cf..f2852c3 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -215,28 +215,29 @@ void PmIpkg::commit() { int sizecount = 0; installDialog = new InstallDialog(settings,0,0,true); - QCheckListItem *toRemoveItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") ); - QCheckListItem *toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") ); - toRemoveItem->setOpen( true ); - toInstallItem->setOpen( true ); + installDialog->toRemoveItem->setOpen( true ); + installDialog->toInstallItem->setOpen( true ); for (uint i=0; i < to_remove.count(); i++) { sizecount += 1; - toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) ); + installDialog->toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) ); } for (uint i=0; i < to_install.count(); i++) { sizecount += to_install.at(i)->size().toInt(); - toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) ); + installDialog->toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) ); } runwindow->progress->setTotalSteps(sizecount); qDebug("Install size %i",sizecount); installDialog->showMaximized(); installDialog->show(); - if ( installDialog->exec() ) doIt(); - installDialog->close(); + if ( installDialog->exec() ) + { + doIt(); runwindow->showMaximized(); runwindow->show(); + } + installDialog->close(); out(tr("\nAll done.")); } @@ -259,22 +260,23 @@ void PmIpkg::remove() for (uint i=0; i < to_remove.count(); i++) { if ( to_remove.at(i)->link() )fileList = getList( to_remove.at(i)->name(), to_remove.at(i)->dest() ); - if ( runIpkg("remove " + to_remove.at(i)->name(), to_remove.at(i)->dest() )) + if ( runIpkg("remove " + to_remove.at(i)->installName(), to_remove.at(i)->dest() )) { runwindow->progress->setProgress( 1 ); linkOpp = removeLink; - if ( to_remove.at(i)->link() ) - { - out( "\nremoving links\n" ); - out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" ); - processFileList( fileList, to_remove.at(i)->dest() ); - } to_remove.at(i)->processed(); to_remove.take( i ); + out("\n\n"); }else{ out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); } + if ( to_remove.at(i)->link() ) + { + out( "\nremoving links\n" ); + out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" ); + processFileList( fileList, to_remove.at(i)->dest() ); + } if ( to_remove.at(i)->link() )delete fileList; } to_remove.clear(); @@ -291,6 +293,12 @@ void PmIpkg::install() if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() )) { runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress()); + to_install.at(i)->processed(); + to_install.take( i ); + out("\n\n"); + }else{ + out(tr("Error while installing")+to_install.at(i)->name()+"\n"); + } linkOpp = createLink; if ( to_install.at(i)->link() ) { @@ -298,12 +306,6 @@ void PmIpkg::install() out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" ); makeLinks( to_install.at(i) ); } - to_install.at(i)->processed(); - to_install.take( i ); - out("\n\n"); - }else{ - out(tr("Error while installing")+to_install.at(i)->name()+"\n"); - } } out("\n"); to_install.clear(); |