summaryrefslogtreecommitdiff
authortille <tille>2002-05-03 19:08:09 (UTC)
committer tille <tille>2002-05-03 19:08:09 (UTC)
commit4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653 (patch) (side-by-side diff)
tree66d77ffe196c448782ce0d04877641280e74890d
parent6bf450ac622d22ba7e9156e474a7abb714167eba (diff)
downloadopie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.zip
opie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.tar.gz
opie-4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/TODO3
-rw-r--r--noncore/unsupported/oipkg/main.cpp3
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp10
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h2
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.cpp3
-rw-r--r--noncore/unsupported/oipkg/packagelistremote.cpp1
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp127
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h2
8 files changed, 74 insertions, 77 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO
index b1ae6e3..6de54ec 100644
--- a/noncore/unsupported/oipkg/TODO
+++ b/noncore/unsupported/oipkg/TODO
@@ -12,3 +12,4 @@
* different types of filters and searches
i.e. name, desc, files etc
-* mark packages from doclnk and ipkgfind installed if installed \ No newline at end of file
+* mark packages from doclnk and ipkgfind installed if installed
+* show if different version is installed \ No newline at end of file
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp
index bacc973..4af11df 100644
--- a/noncore/unsupported/oipkg/main.cpp
+++ b/noncore/unsupported/oipkg/main.cpp
@@ -14,8 +14,9 @@ int main( int argc, char ** argv )
{
debugLevel = QString ( argv[1] ).toInt();
+ qDebug("setting debug level to %i",debugLevel);
}
QPEApplication a( argc, argv );
MainWindow mw;
- if (debugLevel < 4)
+ if (argc > 2)
QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!");
a.showMainDocumentWidget( &mw );
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 259a789..4f6e4cc 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -251,7 +251,7 @@ void MainWindow::runIpkg()
{
packageListServers.allPackages();
- ipkg->loadList( packageListSearch );
- ipkg->loadList( packageListDocLnk );
- ipkg->loadList( packageListServers );
+ ipkg->loadList( &packageListSearch );
+ ipkg->loadList( &packageListDocLnk );
+ ipkg->loadList( &packageListServers );
ipkg->commit();
// ##### If we looked in the list of files, we could send out accurate
@@ -423,5 +423,6 @@ void MainWindow::setDocument(const QString &fileName)
QString lf = QString::null;
e << lf;
- displayList();
+ // displayList();
+ exit;
}
@@ -484,4 +485,5 @@ void MainWindow::remotePackageQuery()
{
packageListSearch.query( searchEdit->text() );
+ packageListSearch.update();
displayList();
}
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h
index f6023b0..7c93dad 100644
--- a/noncore/unsupported/oipkg/mainwindow.h
+++ b/noncore/unsupported/oipkg/mainwindow.h
@@ -70,5 +70,5 @@ private:
PmIpkg* ipkg;
PackageManagerSettings *settings;
- PackageListLocal packageListServers;
+ PackageListLocal packageListServers;
PackageListRemote packageListSearch;
PackageListDocLnk packageListDocLnk;
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
index 5787fdf..1d10adf 100644
--- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
@@ -21,4 +21,5 @@ PackageListDocLnk::PackageListDocLnk()
cfg.setGroup( "Common" );
docLnkDir = cfg.readEntry( "docLnkDir", "/root/" );
+ pvDebug(2,"opening DocLnkSet "+docLnkDir);
doclnkset = new DocLnkSet(docLnkDir,"application/ipkg");
}
@@ -36,5 +37,5 @@ void PackageListDocLnk::update()
{
pvDebug(2,"PackageListDocLnk::update ");
- QList<DocLnk> packlist = doclnkset->children();
+ QList<DocLnk> packlist = doclnkset->children();
for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() )
{
diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp
index 3c6ede7..ee54fca 100644
--- a/noncore/unsupported/oipkg/packagelistremote.cpp
+++ b/noncore/unsupported/oipkg/packagelistremote.cpp
@@ -23,4 +23,5 @@ PackageListRemote::~PackageListRemote()
void PackageListRemote::query(QString s)
{
+ pvDebug(4,"set query "+s);
searchString = s;
}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index fd8279b..0ae74da 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -45,5 +45,5 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest )
#ifdef PROC
- QStringList cmd = "/usr/bin/ipkg ";
+ QStringList cmd = "ipkg ";
#endif
#ifdef SYSTEM
@@ -76,6 +76,6 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest )
out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" );
QString description;
- ipkg->exec("",o);
-// out( o );
+ r = ipkg->exec("",o);
+ out( o );
#endif
#ifdef SYSTEM
@@ -178,5 +178,4 @@ void PmIpkg::processLinkDir( QString file, QString dest )
QFileInfoListIterator it( *list );
QFileInfo *fi;
- qDebug( "while %i",list->count());
while ( (fi=it.current()) )
{
@@ -209,7 +208,7 @@ void PmIpkg::processLinkDir( QString file, QString dest )
}
-void PmIpkg::loadList( PackageList pl )
+void PmIpkg::loadList( PackageList *pl )
{
- for( Package *pack = pl.first();pack ; (pack = pl.next()) )
+ for( Package *pack = pl->first();pack ; (pack = pl->next()) )
{
if ( pack && (pack->name() != "") && pack)
@@ -226,34 +225,26 @@ void PmIpkg::commit()
{
int sizecount = 0;
- for (uint i=0; i < to_remove.count(); i++)
- sizecount += 1;
- for (uint i=0; i < to_install.count(); i++)
- sizecount += to_install.at(i)->size().toInt();
- runwindow->progress->setTotalSteps(sizecount);
- startDialog();
-}
-
-void PmIpkg::startDialog()
-{
installDialog = new InstallDialog(settings,0,0,true);
- QCheckListItem *toRemoveItem;
- toRemoveItem= new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") );
+ QCheckListItem *toRemoveItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To remove") );
+ QCheckListItem *toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") );
toRemoveItem->setOpen( true );
- for (Package *it=to_remove.first(); it != 0; it=to_remove.next() )
+ toInstallItem->setOpen( true );
+ for (uint i=0; i < to_remove.count(); i++)
{
- toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, it,settings) );
+ sizecount += 1;
+ toRemoveItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_remove.at(i),settings) );
}
- QCheckListItem *toInstallItem;
- toInstallItem = new QCheckListItem( installDialog->ListViewPackages, QObject::tr("To install") );
- toInstallItem->setOpen( true );
- for (Package *it=to_install.first(); it != 0; it=to_install.next() )
+ for (uint i=0; i < to_install.count(); i++)
{
- toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, it,settings) );
+ sizecount += to_install.at(i)->size().toInt();
+ toInstallItem->insertItem( new PackageListItem(installDialog->ListViewPackages, to_install.at(i),settings) );
}
+ runwindow->progress->setTotalSteps(sizecount);
+ qDebug("Install size %i",sizecount);
installDialog->showMaximized();
if ( installDialog->exec() ) doIt();
installDialog->close();
+ runwindow->showMaximized();
out(tr("<b>All done.</b>"));
- to_install.clear();
}
@@ -273,26 +264,27 @@ void PmIpkg::remove()
QStringList *fileList;
- for (Package *it=to_remove.first(); it != 0; it=to_remove.next() )
+ for (uint i=0; i < to_remove.count(); i++)
{
- if ( it->link() )fileList = getList( it->name(), it->dest() );
- if ( runIpkg("remove " + it->name(), it->dest() ) == 0)
- {
- runwindow->progress->setProgress( 1 + runwindow->progress->progress() );
- linkOpp = removeLink;
- if ( it->link() )
- {
+ 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() ) == 0)
+ {
+ runwindow->progress->setProgress( 1 );
+ linkOpp = removeLink;
+ if ( to_remove.at(i)->link() )
+ {
out( "<br>removing links<br>" );
- out( "for package "+it->name()+" in "+it->dest()+"<br>" );
- processFileList( fileList, it->dest() );
- }
- it->processed();
-// to_install.take( it );
- out("<br><hr>");
- }else{
- out("<b>"+tr("Error while removing")+"</b><hr>"+it->name());
+ out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"<br>" );
+ processFileList( fileList, to_remove.at(i)->dest() );
}
- if ( it->link() )delete fileList;
+ to_remove.at(i)->processed();
+ to_remove.take( i );
+ out("<br><hr>");
+ }else{
+ out("<b>"+tr("Error while removing")+"</b><hr>"+to_remove.at(i)->name());
}
- out("<br>");
+ if ( to_remove.at(i)->link() )delete fileList;
+ }
+ to_remove.clear();
+ out("<br>");
}
@@ -301,27 +293,26 @@ void PmIpkg::install()
{
if ( to_install.count() == 0 ) return;
- out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>");
- for (Package *it=to_install.first(); it != 0; it=to_install.next() )
- {
-
- if ( runIpkg("install " + it->installName(), it->dest() ) == 0 )
- {
- runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress());
- linkOpp = createLink;
- if ( it->link() )
- {
- out( "<br>creating links<br>" );
- out( "for package "+it->name()+" in "+it->dest()+"<br>" );
- makeLinks( it );
- }
- it->processed();
-// to_install.take( it->name() );
- out("<br><hr>");
- }else{
- out("<b>"+tr("Error while installing")+"</b><hr>"+it->name());
- }
+ out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>");
+ for (uint i=0; i < to_install.count(); i++)
+ {
+ if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ) == 0 )
+ {
+ runwindow->progress->setProgress( to_install.at(i)->size().toInt() );
+ linkOpp = createLink;
+ if ( to_install.at(i)->link() )
+ {
+ out( "<br>creating links<br>" );
+ out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"<br>" );
+ makeLinks( to_install.at(i) );
+ }
+ to_install.at(i)->processed();
+ to_install.take( i );
+ out("<br><hr>");
+ }else{
+ out("<b>"+tr("Error while installing")+"</b><hr>"+to_install.at(i)->name());
}
- out("<br>");
- to_install.clear();
+ }
+ out("<br>");
+ to_install.clear();
}
@@ -399,5 +390,5 @@ void PmIpkg::installFile(const QString &fileName, const QString &dest)
if ( dest!="") p->setDest( dest );
to_install.append( p );
- startDialog();
+ commit();
delete p;
}
@@ -412,5 +403,5 @@ void PmIpkg::removeFile(const QString &fileName, const QString &dest)
if ( dest!="") p->setDest( dest );
to_remove.append( p );
- startDialog();
+ commit();
delete p;
}
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h
index d2490e8..7bc62f1 100644
--- a/noncore/unsupported/oipkg/pmipkg.h
+++ b/noncore/unsupported/oipkg/pmipkg.h
@@ -25,5 +25,5 @@ public:
int linkOpp;
- void loadList( PackageList );
+ void loadList( PackageList* );
void commit();
void update();