author | sandman <sandman> | 2002-09-24 23:36:58 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-24 23:36:58 (UTC) |
commit | 6398fb2352fd4b53a023ec2884b786b08af8bd9f (patch) (side-by-side diff) | |
tree | 7d65dd2faebf08af764a8497f825c9e8b500acc0 | |
parent | cfb3613fcf068f071b353b26f778fc9b41ac8a38 (diff) | |
download | opie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.zip opie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.tar.gz opie-6398fb2352fd4b53a023ec2884b786b08af8bd9f.tar.bz2 |
Fixed loading of file extensions from mime.types (only the first ext was
loaded)
-rw-r--r-- | library/mimetype.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/library/mimetype.cpp b/library/mimetype.cpp index e2e0dab..92fe5e6 100644 --- a/library/mimetype.cpp +++ b/library/mimetype.cpp @@ -240,20 +240,18 @@ void MimeType::loadExtensions(const QString& filename) QStringList::ConstIterator it = tokens.begin(); if ( it != tokens.end() ) { QString id = *it; ++it; // new override old (though left overrides right) QStringList exts = (*extFor)[id]; QStringList newexts; - if ( it != tokens.end() ) { + while ( it != tokens.end() ) { exts.remove(*it); if ( !newexts.contains(*it) ) newexts.append(*it); - while (it != tokens.end()) { - (*typeFor)[*it] = id; - ++it; - } + (*typeFor)[*it] = id; + ++it; } (*extFor)[id] = newexts + exts; } } } } |