[Differential] [Request, 25 lines] D1813: Fix selected name filter with multiple mimetypes

elvisangelaccio (Elvis Angelaccio) noreply at phabricator.kde.org
Fri Jun 10 10:17:57 UTC 2016


elvisangelaccio created this revision.
elvisangelaccio added a reviewer: Plasma.
elvisangelaccio added a subscriber: Plasma.
elvisangelaccio set the repository for this revision to rPLASMAINTEGRATION Integration for Qt applications in Plasma.
elvisangelaccio added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  For some reason, the `kde2QtFilter()` function returns an empty string when the filedialog has more than one mimetype set (through `setMimeTypeFilters()`) and the user selects a specific filter (among the default filters provided by those mimetypes).
  
  This patch just adds a simple fallback when that function is about to return an empty string.

TEST PLAN
  - build/tests/qfiledialogtest --mimeFilter application/json --mimeFilter application/zip
  - Select the json filter
  - Select a json file
  - Check the "selected name filter" in the debug output. Without patch -> empty string, with the patch: `JSON document (*.json)`

REPOSITORY
  rPLASMAINTEGRATION Integration for Qt applications in Plasma

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

AFFECTED FILES
  src/platformtheme/kdeplatformfiledialoghelper.cpp
  tests/qfiledialogtest.cpp

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

To: elvisangelaccio, #plasma
Cc: plasma-devel, #plasma, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160610/a55ae86e/attachment.html>


More information about the Plasma-devel mailing list