D24383: Display "executable" in info panel instead of "unknown"
Elvis Angelaccio
noreply at phabricator.kde.org
Tue Oct 8 21:30:43 BST 2019
elvisangelaccio requested changes to this revision.
elvisangelaccio added a comment.
This revision now requires changes to proceed.
+1 for the idea.
INLINE COMMENTS
> infopanel.cpp:183
>
> - m_typeValueLabel->setText(mimeType.comment());
> + if (entry->isExecutable() && mimeType.name() == QStringLiteral("application/octet-stream")) {
> + m_typeValueLabel->setText(i18n("executable"));
Please use `mimeType.isDefault()` instead.
> infopanel.cpp:184
> + if (entry->isExecutable() && mimeType.name() == QStringLiteral("application/octet-stream")) {
> + m_typeValueLabel->setText(i18n("executable"));
> + } else {
Instead of using a custom string (which needs to be translated from scratch), we could get the mimetype using `db.mimeTypeForName(QStringLiteral("application/x-executable"))` and then get the `comment()` of this mimetype.
REPOSITORY
R36 Ark
REVISION DETAIL
https://phabricator.kde.org/D24383
To: umanovskis, #ark, elvisangelaccio
Cc: kde-utils-devel, #ark, fbampaloukas, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20191008/e05e2edb/attachment.html>
More information about the Kde-utils-devel
mailing list