Diffstat (limited to 'noncore/unsupported/oipkg/package.cpp') (more/less context) (ignore 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 | |||
@@ -69,55 +69,55 @@ void Package::setValue( QString n, QString t ) | |||
69 | }else if ( n == "Installed-Size" ) | 69 | }else if ( n == "Installed-Size" ) |
70 | { | 70 | { |
71 | _size = t; | 71 | _size = t; |
72 | }else if ( n == "Priority") | 72 | // }else if ( n == "Priority") |
73 | { | 73 | // { |
74 | 74 | ||
75 | }else if ( n == "Section") | 75 | }else if ( n == "Section") |
76 | { | 76 | { |
77 | setSection( t ); | 77 | setSection( t ); |
78 | }else if ( n == "Maintainer") | 78 | // }else if ( n == "Maintainer") |
79 | { | 79 | // { |
80 | 80 | // | |
81 | }else if ( n == "Architecture") | 81 | // }else if ( n == "Architecture") |
82 | { | 82 | // { |
83 | 83 | ||
84 | }else if ( n == "Version") | 84 | }else if ( n == "Version") |
85 | { | 85 | { |
86 | 86 | _version = t; | |
87 | }else if ( n == "Pre-Depends") | 87 | // }else if ( n == "Pre-Depends") |
88 | { | 88 | // { |
89 | 89 | // | |
90 | }else if ( n == "Depends") | 90 | // }else if ( n == "Depends") |
91 | { | 91 | // { |
92 | 92 | ||
93 | }else if ( n == "Filename") | 93 | }else if ( n == "Filename") |
94 | { | 94 | { |
95 | _fileName = t; | 95 | _fileName = t; |
96 | }else if ( n == "Size") | 96 | // }else if ( n == "Size") |
97 | { | 97 | // { |
98 | 98 | // | |
99 | }else if ( n == "MD5Sum") | 99 | //}else if ( n == "MD5Sum") |
100 | { | 100 | //{ |
101 | 101 | ||
102 | } | 102 | }else if ( n == "Description") |
103 | if ( n == "Description") | ||
104 | { | 103 | { |
105 | setDesc( t ); | 104 | setDesc( t ); |
106 | } | 105 | }else if ( n == "Status") |
107 | if ( n == "Status") | ||
108 | { | 106 | { |
109 | if ( installed() ) return; | 107 | if ( installed() ) return; |
110 | _status = t; | 108 | _status = t; |
111 | } | 109 | // }else if ( n == "Essential") |
112 | if ( t == "Essential") | 110 | // { |
113 | { | ||
114 | 111 | ||
112 | }else{ | ||
113 | _values.insert(n,new QString(t)); | ||
115 | } | 114 | } |
116 | }; | 115 | } |
117 | 116 | ||
118 | QString Package::name() | 117 | QString Package::name() |
119 | { | 118 | { |
120 | return _name; | 119 | if (_displayName.isEmpty() ) return _name; |
120 | else return _displayName; | ||
121 | } | 121 | } |
122 | 122 | ||
123 | 123 | ||
@@ -153,6 +153,12 @@ QString Package::size() | |||
153 | return _size; | 153 | return _size; |
154 | } | 154 | } |
155 | 155 | ||
156 | |||
157 | QString Package::version() | ||
158 | { | ||
159 | return _version; | ||
160 | } | ||
161 | |||
156 | QString Package::sizeUnits() | 162 | QString Package::sizeUnits() |
157 | { | 163 | { |
158 | int i = _size.toInt(); | 164 | int i = _size.toInt(); |
@@ -350,3 +356,8 @@ void Package::instalFromFile(bool iff) | |||
350 | { | 356 | { |
351 | _useFileName = iff; | 357 | _useFileName = iff; |
352 | } | 358 | } |
359 | |||
360 | void Package::setName(QString n) | ||
361 | { | ||
362 | _displayName = n; | ||
363 | } | ||