diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-08 15:53:29 +0200 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-09 10:21:27 +0200 |
| commit | 21a281d9622b22fa8bd6f731226eff8e5ee9802d (patch) | |
| tree | 4ed3e6f27b2eb0da0e84fb764e41a3447e55087b /util/cmake/configurejson2cmake.py | |
| parent | a126b9be890be123a46e834bfe6743d72dee935d (diff) | |
pro2cmake: run make format to fix styling issues
Pick-to: 6.2
Change-Id: I718e34d628576bb709096c0672da3a69b71ae8df
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'util/cmake/configurejson2cmake.py')
| -rwxr-xr-x | util/cmake/configurejson2cmake.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index b5e148f63cc..3be7118080e 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -611,7 +611,7 @@ def write_compile_test( head = detail.get("head") if isinstance(head, list): head = "\n".join(head) - return head + '\n' if head else '' + return head + "\n" if head else "" head = "" if inherit_details: @@ -646,7 +646,7 @@ def write_compile_test( tail = detail.get("tail") if isinstance(tail, list): tail = "\n".join(tail) - return tail + '\n' if tail else '' + return tail + "\n" if tail else "" tail = "" if inherit_details: @@ -655,8 +655,8 @@ def write_compile_test( sourceCode += tail - if sourceCode: # blank line before main - sourceCode += '\n' + if sourceCode: # blank line before main + sourceCode += "\n" sourceCode += "int main(void)\n" sourceCode += "{\n" sourceCode += " /* BEGIN TEST: */\n" @@ -665,7 +665,7 @@ def write_compile_test( main = detail.get("main") if isinstance(main, list): main = "\n".join(main) - return main + '\n' if main else '' + return main + "\n" if main else "" main = "" if inherit_details: @@ -943,7 +943,11 @@ endif()""", "qreal": { "condition": 'DEFINED QT_COORD_TYPE AND NOT QT_COORD_TYPE STREQUAL "double"', "output": [ - {"type": "define", "name": "QT_COORD_TYPE", "value": "${QT_COORD_TYPE}",}, + { + "type": "define", + "name": "QT_COORD_TYPE", + "value": "${QT_COORD_TYPE}", + }, { "type": "define", "name": "QT_COORD_TYPE_STRING", @@ -951,7 +955,9 @@ endif()""", }, ], }, - "reduce_exports": {"condition": "NOT MSVC",}, + "reduce_exports": { + "condition": "NOT MSVC", + }, "release": None, "release_tools": None, "rpath": { @@ -1524,6 +1530,7 @@ class special_cased_file: self.sc_handler.handle_special_cases() os.replace(self.gen_file_path, self.file_path) + def processJson(path, ctx, data, skip_special_case_preservation=False): ctx["project_dir"] = path ctx["module"] = data.get("module", "global") @@ -1571,7 +1578,7 @@ def main(): quit(1) directory = sys.argv[1] - skip_special_case_preservation = '-s' in sys.argv[2:] + skip_special_case_preservation = "-s" in sys.argv[2:] print(f"Processing: {directory}.") |
