summaryrefslogtreecommitdiff
authortille <tille>2002-07-24 11:37:36 (UTC)
committer tille <tille>2002-07-24 11:37:36 (UTC)
commitadfb21cd5e2fcf750543570ab9c6427f1fba9968 (patch) (side-by-side diff)
tree1a55eb15bd48b373cd3a88a41cb5733af9f9a4b9
parent0948a167e4e46e6d2082809ec47be6a08a5de9d7 (diff)
downloadopie-adfb21cd5e2fcf750543570ab9c6427f1fba9968.zip
opie-adfb21cd5e2fcf750543570ab9c6427f1fba9968.tar.gz
opie-adfb21cd5e2fcf750543570ab9c6427f1fba9968.tar.bz2
fix bug #116 -- subsections
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 998dae9..edb9cc5 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -142,38 +142,37 @@ void PackageList::setSection( QString sec )
aktSection = sec;
}
void PackageList::setSubSection( QString ssec )
{
aktSubSection = ssec;
}
void PackageList::updateSections( Package* pack )
{
QString s = pack->section();
if ( s.isEmpty() || s == "") return;
- if ( sections.contains(s) ) return;
- sections += s;
+ if ( !sections.contains(s) ) sections += s;
QString ss = pack->subSection();
if ( ss.isEmpty() || ss == "" ) return;
if ( !subSections[s] ) {
subSections.insert( s, new QStringList() );
QStringList *subsecs = subSections[s];
*subsecs += "All";
}
QStringList *subsecs = subSections[s];
- *subsecs += ss;
- if ( !subSections["All"] ) subSections.insert( "All", new QStringList() );
- subsecs = subSections["All"];
- *subsecs += ss;
+ if ( !subsecs->contains(ss) ) *subsecs += ss;
+// if ( !subSections["All"] ) subSections.insert( "All", new QStringList() );
+// subsecs = subSections["All"];
+// *subsecs += ss;
}
void PackageList::readFileEntries( QString filename, QString dest )
{
pvDebug(5,"PackageList::readFileEntries "+filename+" dest "+dest);
QStringList packEntry;
QFile f( filename );
if ( !f.open(IO_ReadOnly) ) return;
QTextStream *statusStream = new QTextStream( &f );
while ( !statusStream ->eof() )
{