summaryrefslogtreecommitdiff
authorsandman <sandman>2002-09-24 23:36:58 (UTC)
committer sandman <sandman>2002-09-24 23:36:58 (UTC)
commit6398fb2352fd4b53a023ec2884b786b08af8bd9f (patch) (unidiff)
tree7d65dd2faebf08af764a8497f825c9e8b500acc0
parentcfb3613fcf068f071b353b26f778fc9b41ac8a38 (diff)
downloadopie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.zip
opie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.tar.gz
opie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.tar.bz2
Fixed loading of file extensions from mime.types (only the first ext was
loaded)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/mimetype.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index e2e0dab..92fe5e6 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -243,15 +243,13 @@ void MimeType::loadExtensions(const QString& filename)
243 // new override old (though left overrides right) 243 // new override old (though left overrides right)
244 QStringList exts = (*extFor)[id]; 244 QStringList exts = (*extFor)[id];
245 QStringList newexts; 245 QStringList newexts;
246 if ( it != tokens.end() ) { 246 while ( it != tokens.end() ) {
247 exts.remove(*it); 247 exts.remove(*it);
248 if ( !newexts.contains(*it) ) 248 if ( !newexts.contains(*it) )
249 newexts.append(*it); 249 newexts.append(*it);
250 while (it != tokens.end()) {
251 (*typeFor)[*it] = id; 250 (*typeFor)[*it] = id;
252 ++it; 251 ++it;
253 } 252 }
254 }
255 (*extFor)[id] = newexts + exts; 253 (*extFor)[id] = newexts + exts;
256 } 254 }
257 } 255 }