Changeset View
Changeset View
Standalone View
Standalone View
krArc/krarcbasemanager.cpp
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Line(s) | 203 | /*! | |||
---|---|---|---|---|---|
204 | \param mime The mime type of the file. | 204 | \param mime The mime type of the file. | ||
205 | \return A short QString which contains an identifier of the type of the file. | 205 | \return A short QString which contains an identifier of the type of the file. | ||
206 | */ | 206 | */ | ||
207 | QString KrArcBaseManager::getShortTypeFromMime(const QString &mime) | 207 | QString KrArcBaseManager::getShortTypeFromMime(const QString &mime) | ||
208 | { | 208 | { | ||
209 | // Reminder: If a mime type is added/removed/modified in that | 209 | // Reminder: If a mime type is added/removed/modified in that | ||
210 | // member function, it's important to research if the type has to | 210 | // member function, it's important to research if the type has to | ||
211 | // be added/removed/modified in the `krarc.protocol` file, or | 211 | // be added/removed/modified in the `krarc.protocol` file, or | ||
212 | // in `KrServices::generateKrarcArchiveMimetypes()` | 212 | // in `KRarcHandler::KRarcHandler()` | ||
213 | 213 | | |||
214 | // 7zip files are a not a normal case because their mimetype does not | 214 | // 7zip files are a not a normal case because their mimetype does not | ||
215 | // follow the norm of other types: zip, tar, lha, ace, arj, etc. | 215 | // follow the norm of other types: zip, tar, lha, ace, arj, etc. | ||
216 | if (mime == "application/x-7z-compressed") | 216 | if (mime == "application/x-7z-compressed") | ||
217 | return "7z"; | 217 | return "7z"; | ||
218 | 218 | | |||
219 | // If it's a rar file but its mimetype isn't "application/x-rar" | 219 | // If it's a rar file but its mimetype isn't "application/x-rar" | ||
220 | if (mime == "application/x-rar-compressed" || mime == "application/vnd.rar") | 220 | if (mime == "application/x-rar-compressed" || mime == "application/vnd.rar") | ||
Show All 19 Lines |