- 
    Bug 
- 
    Resolution: Fixed
- 
    P3: Somewhat important 
- 
    5.10.1, 5.12.3
- 
    None
- 
        
- 
        de704b633 (dev), c662fb0be (6.5), b75ab7662 (6.4)
Sample code:
  Button {
    id: filtersButton
    property bool flag: true
    anchors.centerIn: parent
    text: flag ? "PNG (*.png)" : "JPEG (*.jpg)"
    onClicked: flag = !flag
  }
  Button {
    id: openButton
    anchors.horizontalCenter: filtersButton.horizontalCenter
    anchors.top: filtersButton.bottom
    anchors.topMargin: 16
    text: "Open"
    onClicked: fileDialog.visible = true
  }
  FileDialog {
    id: fileDialog
    nameFilters: filtersButton.text
  }
Steps to reproduce:
 1. Click openButton to open file dialog.
 QWindowsNativeFileDialogBase::setNameFilters will be called, which will set m_nameFilters.
 2. Close file dialog.
 3. Click filtersButton to swap filters.
 QWindowsNativeFileDialogBase::selectNameFilter will be called. It will try to find index of a new filter in m_nameFilters. But it fails because m_nameFilters still contains old list of filters, since it is updated only on the dialog open. This produce two similar messages in console:
QWindowsNativeFileDialogBase::selectNameFilter: Invalid parameter 'JPEG (*.jpg)' not found in 'PNG (*.png)'. QWindowsNativeFileDialogBase::selectNameFilter: Invalid parameter 'JPEG (*.jpg)' not found in 'PNG (*.png)'.
- relates to
- 
                    QTBUG-61042 A QML FileDialog shows a warning in a console after reseting the 'nameFilters' property -         
- Closed
 
-