D21959: Fix selectedNameFilter() multiple matches

Robert Hoffmann noreply at phabricator.kde.org
Fri Jun 21 12:37:05 BST 2019


hoffmannrobert created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
hoffmannrobert requested review of this revision.

REVISION SUMMARY
  If your filter list has two matching filters for an extension, KFileWidget
  will return the name of the first filter when calling
  QFileDialog::selectedNameFilter(), even if the second filter was selected
  in the dialog.
  
  This is a follow-up for https://phabricator.kde.org/D21249

TEST PLAN
  1. Compile and run the attached program to the bug report 407819
  2. Make sure that "auto extension" checkbox is enabled
  3. Select the last file filter (DocBook (.xml)) via dropdown list
  4. Click "Save"
  5. Check program output
  
  Result without this patch:
  The output is "Word 2003 XML (.xml) (*.xml)"
  
  Result with this patch applied:
  The output should be "DocBook (.xml) (*.xml)", since this was selected in the file dialog.
  
  Fixes bug 407819

REPOSITORY
  R135 Integration for Qt applications in Plasma

BRANCH
  fix_selectedNameFilter

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

AFFECTED FILES
  autotests/kfiledialog_unittest.cpp
  src/platformtheme/kdeplatformfiledialogbase_p.h
  src/platformtheme/kdeplatformfiledialoghelper.cpp
  src/platformtheme/kdeplatformfiledialoghelper.h
  src/platformtheme/kdirselectdialog.cpp
  src/platformtheme/kdirselectdialog_p.h

To: hoffmannrobert
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190621/7dc6ecd7/attachment.html>


More information about the Plasma-devel mailing list