Merge branch '3.3' into feature_show_config_errors

This commit is contained in:
Ghostkeeper 2018-04-12 16:20:42 +02:00
commit 942afe2c3f
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
49 changed files with 2941 additions and 3325 deletions

View file

@ -210,6 +210,7 @@ class PostProcessingPlugin(QObject, Extension):
continue
script_str = script_str.replace("\\n", "\n").replace("\\\\", "\\") #Unescape escape sequences.
script_parser = configparser.ConfigParser(interpolation = None)
script_parser.optionxform = str #Don't transform the setting keys as they are case-sensitive.
script_parser.read_string(script_str)
for script_name, settings in script_parser.items(): #There should only be one, really! Otherwise we can't guarantee the order or allow multiple uses of the same script.
if script_name == "DEFAULT": #ConfigParser always has a DEFAULT section, but we don't fill it. Ignore this one.
@ -230,6 +231,7 @@ class PostProcessingPlugin(QObject, Extension):
script_list_strs = []
for script in self._script_list:
parser = configparser.ConfigParser(interpolation = None) #We'll encode the script as a config with one section. The section header is the key and its values are the settings.
parser.optionxform = str #Don't transform the setting keys as they are case-sensitive.
script_name = script.getSettingData()["key"]
parser.add_section(script_name)
for key in script.getSettingData()["settings"]: