D5446: Implement support for selected mime type filters

Elvis Angelaccio noreply at phabricator.kde.org
Sat Apr 15 09:05:45 UTC 2017


elvisangelaccio added inline comments.

INLINE COMMENTS

> elvisangelaccio wrote in qfiledialogtest.cpp:116
> ...or maybe we can turn the assert in a qWarning()? Otherwise if isMimeFilter() is false we get a name filter instead of a mimetype, a bit misleading?

The problem is that if `isMimeFilter()` is false we get a name filter instead of a mimetype, which is not expected.
This could be fixed by something like:

  if (m_fileWidget->filterWidget()->isMimeFilter()) {
      return m_fileWidget->filterWidget()->currentFilter();
  } else {
      // detect mimetype of selectedFiles() using QMimeDatabase
      ...
  }

Does it make sense?

REPOSITORY
  R135 Integration for Qt applications in Plasma

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

To: elvisangelaccio, #plasma, dfaure
Cc: plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170415/6b7c2dc4/attachment.html>


More information about the Plasma-devel mailing list