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

Reply via email to