summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelist.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp46
1 files changed, 32 insertions, 14 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 944bb83..035ec81 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -72,4 +72,4 @@ void PackageList::filterPackages( QString f )
if (
- ((aktSection=="All")||(pack->getSection()==aktSection)) &&
- ((aktSubSection=="All")||(pack->getSubSection()==aktSubSection)) &&
+ ((aktSection=="All")||(pack->section()==aktSection)) &&
+ ((aktSubSection=="All")||(pack->subSection()==aktSubSection)) &&
pack->name().contains( f )
@@ -128,3 +128,3 @@ void PackageList::updateSections( Package* pack )
{
- QString s = pack->getSection();
+ QString s = pack->section();
if ( s.isEmpty() || s == "") return;
@@ -132,3 +132,3 @@ void PackageList::updateSections( Package* pack )
sections += s;
- QString ss = pack->getSubSection();
+ QString ss = pack->subSection();
if ( ss.isEmpty() || ss == "" ) return;
@@ -152,6 +152,9 @@ void PackageList::parseStatus()
QStringList dests = settings->getDestinationUrls();
- for ( QStringList::Iterator it = dests.begin(); it != dests.end(); ++it )
+ QStringList destnames = settings->getDestinationNames();
+ QStringList::Iterator name = destnames.begin();
+ for ( QStringList::Iterator dir = dests.begin(); dir != dests.end(); ++dir )
{
- pvDebug( 2,"Status Dir: "+*it+statusDir+"/status");
- readFileEntries( *it+statusDir+"/status" );
+ pvDebug( 2,"Status: "+*dir+statusDir+"/status");
+ readFileEntries( *dir+statusDir+"/status", *name );
+ ++name;
};
@@ -165,4 +168,4 @@ void PackageList::parseList()
{
- pvDebug( 2, "List Dir: "+listsDir+"/"+*it);
- readFileEntries( listsDir+"/"+*it );
+ pvDebug( 2, "List: "+listsDir+"/"+*it);
+ readFileEntries( listsDir+"/"+*it, "" );
}
@@ -170,3 +173,3 @@ void PackageList::parseList()
-void PackageList::readFileEntries( QString filename )
+void PackageList::readFileEntries( QString filename, QString dest )
{
@@ -184,3 +187,4 @@ void PackageList::readFileEntries( QString filename )
{
- Package *p = new Package( packEntry );
+ Package *p = new Package( packEntry, settings );
+ p->setDest( dest );
if ( p )
@@ -201,7 +205,7 @@ void PackageList::update()
{
- pvDebug( 3, "parseStatus");
+ pvDebug( 2, "parseStatus");
parseStatus();
- pvDebug( 3, "parseList");
+ pvDebug( 2, "parseList");
parseList();
- pvDebug( 3, "finished parsing");
+ pvDebug( 2, "finished parsing");
}
@@ -223 +227,15 @@ void PackageList::clear()
}
+
+void PackageList::allPackages()
+{
+ packageList.clear();
+ QDictIterator<Package> filterIter( origPackageList );
+ filterIter.toFirst();
+ Package *pack= filterIter.current() ;
+ while ( pack )
+ {
+ packageList.insert( pack->name(), pack );
+ ++filterIter;
+ pack = filterIter.current();
+ }
+}