diff -r d1b65f380408 -r c023821bb25f E5Gui/E5FileDialog.py --- a/E5Gui/E5FileDialog.py Wed Mar 22 18:56:25 2017 +0100 +++ b/E5Gui/E5FileDialog.py Wed Mar 22 19:59:45 2017 +0100 @@ -47,7 +47,7 @@ def getOpenFileName(parent=None, caption="", directory="", - filterStr="", options=QFileDialog.Options()): + filterStr="", options=None): """ Module function to get the name of a file for opening it. @@ -58,6 +58,8 @@ @param options various options for the dialog (QFileDialog.Options) @return name of file to be opened (string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog if PYQT_VERSION_STR >= "5.0.0": @@ -70,7 +72,7 @@ def getOpenFileNameAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", - options=QFileDialog.Options()): + options=None): """ Module function to get the name of a file for opening it and the selected file name filter. @@ -83,6 +85,8 @@ @param options various options for the dialog (QFileDialog.Options) @return name of file to be opened and selected filter (string, string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog newfilter = __reorderFilter(filterStr, initialFilter) @@ -95,7 +99,7 @@ def getOpenFileNames(parent=None, caption="", directory="", - filterStr="", options=QFileDialog.Options()): + filterStr="", options=None): """ Module function to get a list of names of files for opening. @@ -106,6 +110,8 @@ @param options various options for the dialog (QFileDialog.Options) @return list of file names to be opened (list of string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog if PYQT_VERSION_STR >= "5.0.0": @@ -118,7 +124,7 @@ def getOpenFileNamesAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", - options=QFileDialog.Options()): + options=None): """ Module function to get a list of names of files for opening and the selected file name filter. @@ -132,6 +138,8 @@ @return list of file names to be opened and selected filter (list of string, string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog newfilter = __reorderFilter(filterStr, initialFilter) @@ -144,7 +152,7 @@ def getSaveFileName(parent=None, caption="", directory="", - filterStr="", options=QFileDialog.Options()): + filterStr="", options=None): """ Module function to get the name of a file for saving it. @@ -155,6 +163,8 @@ @param options various options for the dialog (QFileDialog.Options) @return name of file to be saved (string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog if PYQT_VERSION_STR >= "5.0.0": @@ -167,7 +177,7 @@ def getSaveFileNameAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", - options=QFileDialog.Options()): + options=None): """ Module function to get the name of a file for saving it and the selected file name filter. @@ -180,6 +190,8 @@ @param options various options for the dialog (QFileDialog.Options) @return name of file to be saved and selected filter (string, string) """ + if options is None: + options = QFileDialog.Options() if Globals.isLinuxPlatform(): options |= QFileDialog.DontUseNativeDialog newfilter = __reorderFilter(filterStr, initialFilter)