summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pmipkg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp20
1 files changed, 11 insertions, 9 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
@@ -238,12 +238,13 @@ void PmIpkg::commit()
{
doIt();
runwindow->showMaximized();
runwindow->show();
}
installDialog->close();
+ delete installDialog;
out(tr("\nAll done."));
}
void PmIpkg::doIt()
{
runwindow->progress->setProgress(0);
@@ -265,17 +266,17 @@ void PmIpkg::remove()
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)->installName(), to_remove.at(i)->dest() ))
{
runwindow->progress->setProgress( 1 );
linkOpp = removeLink;
to_remove.at(i)->processed();
- pvDebug(4,"link "+QString::number(i));
+ pvDebug(3,"link "+QString::number(i));
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
- pvDebug(4,"take "+QString::number(i));
- to_remove.take( i );
+ //pvDebug(3,"take "+QString::number(i)+" of "+QString::number(to_remove.count()));
+ //if ( to_remove.at(i) ) to_remove.take( i );
out("\n");
}else{
out(tr("Error while removing")+to_remove.at(i)->name()+"\n");
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
@@ -300,13 +301,13 @@ void PmIpkg::install()
{
runwindow->progress->setProgress( to_install.at(i)->size().toInt() + runwindow->progress->progress());
to_install.at(i)->processed();
linkOpp = createLink;
if ( to_install.at(i)->link() )
makeLinks( to_install.at(i) );
- to_install.take( i );
+ // to_install.take( i );
out("\n");
}else{
out(tr("Error while installing")+to_install.at(i)->name()+"\n");
linkOpp = createLink;
if ( to_install.at(i)->link() )
makeLinks( to_install.at(i) );
@@ -357,17 +358,12 @@ void PmIpkg::show()
if (!runwindow->isVisible())
{
runwindow->showMaximized();
runwindow->show();
}
runwindow->outPut->setText("");
-// showButtons(b);
-// if ( !b )
-// runwindow->progress->hide();
-// else
-// runwindow->progress->show();
}
void PmIpkg::installFile(const QString &fileName, const QString &dest)
{
to_install.clear();
@@ -390,6 +386,12 @@ void PmIpkg::removeFile(const QString &fileName, const QString &dest)
if ( dest!="") p->setDest( dest );
to_remove.append( p );
commit();
delete p;
}
+
+void PmIpkg::clearLists()
+{
+ to_remove.clear();
+ to_install.clear();
+}