author | tille <tille> | 2002-05-01 15:49:08 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-01 15:49:08 (UTC) |
commit | da94bce203afca412336a7793ff8e58e18d59108 (patch) (side-by-side diff) | |
tree | 0bc25fd1145459656d8cc7a4897bad51f123daf9 /noncore/unsupported/oipkg/package.cpp | |
parent | fcc0cee7ae337e8179b8ba4d4b6c46b519129daa (diff) | |
download | opie-da94bce203afca412336a7793ff8e58e18d59108.zip opie-da94bce203afca412336a7793ff8e58e18d59108.tar.gz opie-da94bce203afca412336a7793ff8e58e18d59108.tar.bz2 |
handles different versions of the same package
Diffstat (limited to 'noncore/unsupported/oipkg/package.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 65 |
1 files changed, 38 insertions, 27 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 6bb53a9..0787ece 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -71,4 +71,4 @@ void Package::setValue( QString n, QString t ) _size = t; - }else if ( n == "Priority") - { +// }else if ( n == "Priority") +// { @@ -77,7 +77,7 @@ void Package::setValue( QString n, QString t ) setSection( t ); - }else if ( n == "Maintainer") - { - - }else if ( n == "Architecture") - { +// }else if ( n == "Maintainer") +// { +// +// }else if ( n == "Architecture") +// { @@ -85,8 +85,8 @@ void Package::setValue( QString n, QString t ) { - - }else if ( n == "Pre-Depends") - { - - }else if ( n == "Depends") - { + _version = t; +// }else if ( n == "Pre-Depends") +// { +// +// }else if ( n == "Depends") +// { @@ -95,14 +95,12 @@ void Package::setValue( QString n, QString t ) _fileName = t; - }else if ( n == "Size") - { - - }else if ( n == "MD5Sum") - { +// }else if ( n == "Size") +// { +// +// }else if ( n == "MD5Sum") +// { - } - if ( n == "Description") + }else if ( n == "Description") { setDesc( t ); - } - if ( n == "Status") + }else if ( n == "Status") { @@ -110,8 +108,9 @@ void Package::setValue( QString n, QString t ) _status = t; - } - if ( t == "Essential") - { +// }else if ( n == "Essential") +// { + }else{ + _values.insert(n,new QString(t)); + } } -}; @@ -119,3 +118,4 @@ QString Package::name() { - return _name; + if (_displayName.isEmpty() ) return _name; + else return _displayName; } @@ -155,2 +155,8 @@ QString Package::size() + +QString Package::version() +{ + return _version; +} + QString Package::sizeUnits() @@ -352 +358,6 @@ void Package::instalFromFile(bool iff) } + +void Package::setName(QString n) +{ + _displayName = n; +} |