-rw-r--r-- | noncore/unsupported/oipkg/TODO | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index b92cbb0..e7b017c 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO | |||
@@ -1,12 +1,13 @@ | |||
1 | * check for networt before installing from network | ||
1 | * Settings Class | 2 | * Settings Class |
2 | * parse "to install" and "to remove" from status | 3 | * parse "to install" and "to remove" from status |
3 | * install local file dialog | 4 | * install local file dialog |
4 | * qcop | 5 | * qcop |
5 | * error handling | 6 | * error handling |
6 | * manage links | 7 | * manage links |
7 | * dependency checking | 8 | * dependency checking |
8 | * create dest if it does not exist | 9 | * create dest if it does not exist |
9 | * allow reinstalling | 10 | * allow reinstalling |
10 | * different types of filters and searches | 11 | * different types of filters and searches |
11 | i.e. name, desc, files etc | 12 | i.e. name, desc, files etc |
12 | * display new list after update \ No newline at end of file | 13 | * display new list after update |
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index bfb48b3..4a09b40 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp | |||
@@ -103,65 +103,73 @@ void Package::setValue( QString n, QString t ) | |||
103 | //{ | 103 | //{ |
104 | 104 | ||
105 | }else if ( n == "Description") | 105 | }else if ( n == "Description") |
106 | { | 106 | { |
107 | setDesc( t ); | 107 | setDesc( t ); |
108 | }else if ( n == "Status") | 108 | }else if ( n == "Status") |
109 | { | 109 | { |
110 | if ( installed() ) return; | 110 | if ( installed() ) return; |
111 | _status = t; | 111 | _status = t; |
112 | // }else if ( n == "Essential") | 112 | // }else if ( n == "Essential") |
113 | // { | 113 | // { |
114 | 114 | ||
115 | }else{ | 115 | }else{ |
116 | _values.insert(n,new QString(t)); | 116 | _values.insert(n,new QString(t)); |
117 | } | 117 | } |
118 | } | 118 | } |
119 | 119 | ||
120 | QString Package::name() | 120 | QString Package::name() |
121 | { | 121 | { |
122 | if (_displayName.isEmpty() ) return _name; | 122 | if (_displayName.isEmpty() ) return _name; |
123 | else return _displayName; | 123 | else return _displayName; |
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | QString Package::installName() | 127 | QString Package::installName() |
128 | { | 128 | { |
129 | if (_useFileName) return _fileName; | 129 | if (_useFileName) return _fileName; |
130 | else return _name; | 130 | else return _name; |
131 | } | 131 | } |
132 | 132 | ||
133 | bool Package::installed() | 133 | bool Package::installed() |
134 | { | 134 | { |
135 | if (_status.contains("installed")) return true; | 135 | if (_status.contains("installed")) |
136 | { | ||
137 | if (_status.contains("not-installed")) | ||
138 | { | ||
139 | _toProcess = true; | ||
140 | return false; | ||
141 | } | ||
142 | else return true; | ||
143 | } | ||
136 | else | 144 | else |
137 | if (_versions) | 145 | if (_versions) |
138 | { | 146 | { |
139 | QDictIterator<Package> other( *_versions ); | 147 | QDictIterator<Package> other( *_versions ); |
140 | while ( other.current() ) | 148 | while ( other.current() ) |
141 | { | 149 | { |
142 | if (other.current()->status().contains("installed") | 150 | if (other.current()->status().contains("installed") |
143 | && other.current()->version() == version()) | 151 | && other.current()->version() == version()) |
144 | return true; | 152 | return true; |
145 | ++other; | 153 | ++other; |
146 | } | 154 | } |
147 | } | 155 | } |
148 | return false; | 156 | return false; |
149 | } | 157 | } |
150 | 158 | ||
151 | bool Package::otherInstalled() | 159 | bool Package::otherInstalled() |
152 | { | 160 | { |
153 | if (_versions) | 161 | if (_versions) |
154 | { | 162 | { |
155 | QDictIterator<Package> other( *_versions ); | 163 | QDictIterator<Package> other( *_versions ); |
156 | while ( other.current() ) | 164 | while ( other.current() ) |
157 | { | 165 | { |
158 | if (other.current()->installed()) return true; | 166 | if (other.current()->installed()) return true; |
159 | ++other; | 167 | ++other; |
160 | } | 168 | } |
161 | } | 169 | } |
162 | return false; | 170 | return false; |
163 | } | 171 | } |
164 | 172 | ||
165 | void Package::setDesc( QString s ) | 173 | void Package::setDesc( QString s ) |
166 | { | 174 | { |
167 | _desc = s; | 175 | _desc = s; |