-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index fdd1163..8f835b7 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp | |||
@@ -31,33 +31,34 @@ PackageList::PackageList( PackageManagerSettings* s) | |||
31 | PackageList(); | 31 | PackageList(); |
32 | } | 32 | } |
33 | 33 | ||
34 | PackageList::~PackageList() | 34 | PackageList::~PackageList() |
35 | { | 35 | { |
36 | if (--packageListAllRefCount < 1 ) delete packageListAll; | 36 | if (--packageListAllRefCount < 1 ) delete packageListAll; |
37 | } | 37 | } |
38 | 38 | ||
39 | /** Inserts a package into the list */ | 39 | /** Inserts a package into the list */ |
40 | void PackageList::insertPackage( Package* pack ) | 40 | void PackageList::insertPackage( Package* pack ) |
41 | { | 41 | { |
42 | if (!pack) return; | 42 | if (!pack) return; |
43 | Package* p = packageListAll->find( pack->name() ); | 43 | Package* p = packageListAll->find( pack->name() ); |
44 | if ( p ) | 44 | if ( p ) |
45 | { | 45 | { |
46 | if ( (p->version() == pack->version()) | 46 | if ( (p->version() == pack->version()) |
47 | && (p->dest() == pack->dest()) ) | 47 | // && (p->dest() == pack->dest()) |
48 | ) | ||
48 | { | 49 | { |
49 | p->copyValues( pack ); | 50 | p->copyValues( pack ); |
50 | delete pack; | 51 | delete pack; |
51 | pack = p; | 52 | pack = p; |
52 | } else { | 53 | } else { |
53 | QDict<Package> *packver = p->getOtherVersions(); | 54 | QDict<Package> *packver = p->getOtherVersions(); |
54 | // p->setName( pack->name()+"["+p->version()+"]" ); | 55 | // p->setName( pack->name()+"["+p->version()+"]" ); |
55 | if (!packver) | 56 | if (!packver) |
56 | { | 57 | { |
57 | packver = new QDict<Package>(); | 58 | packver = new QDict<Package>(); |
58 | packver->insert( pack->name(), p ); | 59 | packver->insert( pack->name(), p ); |
59 | p->setOtherVersions( packver ); | 60 | p->setOtherVersions( packver ); |
60 | } | 61 | } |
61 | pack->setName( pack->name()+"["+pack->version()+"]" ); | 62 | pack->setName( pack->name()+"["+pack->version()+"]" ); |
62 | pack->setOtherVersions( packver ); | 63 | pack->setOtherVersions( packver ); |
63 | packver->insert( pack->name(), pack ); | 64 | packver->insert( pack->name(), pack ); |