mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-01 10:39:34 +12:00
Fixed crash for pre-Qt5.6
Qt has garbage documentation. I dug into Qt 5.0 source code to make sure the crashing call can be safely left out for older versions, and that is indeed the case. setSupportedSchemes() appears to be introduced together with the future to select non-local files in the dialog, but we only cared about local files to begin with.
This commit is contained in:
parent
f6fa3e8375
commit
5da31230c7
|
@ -399,6 +399,7 @@ def getSaveFileNameWithSuffix(parent, caption, directory, filter, options=None,
|
|||
if defaultSuffix:
|
||||
dialog.setDefaultSuffix(defaultSuffix)
|
||||
dialog.setFileMode(QFileDialog.AnyFile)
|
||||
if hasattr(dialog, 'setSupportedSchemes'): # Pre-Qt5.6 lacks this.
|
||||
dialog.setSupportedSchemes(("file",))
|
||||
dialog.setAcceptMode(QFileDialog.AcceptSave)
|
||||
if selectedFilter:
|
||||
|
|
Loading…
Reference in a new issue