[Differential] [Requested Changes To] D1725: Open again children of supported mimetypes

rthomsen (Ragnar Thomsen) noreply at phabricator.kde.org
Sun Jun 5 08:30:37 UTC 2016


rthomsen requested changes to this revision.
rthomsen added a comment.
This revision now requires changes to proceed.


  See inline comment.

INLINE COMMENTS

> archive_kerfuffle.cpp:71-75
> +            foreach (const QString parent, QMimeDatabase().mimeTypeForName(mimeType).parentMimeTypes()) {
> +                if (metaData.mimeTypes().contains(parent)) {
> +                    return true;
> +                }
> +            }

Instead of iterating over the parent mimetypes, you can iterate over metaData.mimeTypes() and then use QMimeType::inherits() to check if mimeType inherits each of those. The result should be the same, but the code might be easier to understand?

REPOSITORY
  rARK Ark

REVISION DETAIL
  https://phabricator.kde.org/D1725

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: elvisangelaccio, rthomsen
Cc: kde-utils-devel, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160605/9149a724/attachment-0001.html>


More information about the Kde-utils-devel mailing list