From 3fd25dcbebb45b6ddb8fe6ad53e55574af923648 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sun, 16 May 2021 19:35:05 +0200 Subject: [PATCH] Change formatter to 6.1 6.1 actually now has support for some modern qml features like inline components. --- Tools/qml_format.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/qml_format.py b/Tools/qml_format.py index 1761fa79..f594e56a 100644 --- a/Tools/qml_format.py +++ b/Tools/qml_format.py @@ -12,20 +12,20 @@ def format_file_function(file): executable = "qmlformat" if os.name == 'nt': executable = "qmlformat.exe" - qt_bin_path = os.path.join(find_absolute_qt_path("5.15.2"), "bin") + qt_bin_path = os.path.join(find_absolute_qt_path("6.1.0"), "bin") executable = os.path.join(qt_bin_path, executable) process = subprocess.run( - "%s -n -i %s" % (executable, file), capture_output=True, shell=True) + "%s -i %s" % (executable, file), capture_output=True, shell=True) print("Format: %s \t return: %s" % (file, process.returncode)) def main(git_staged_only=False): - if "" == find_absolute_qt_path("5.15.2"): + if "" == find_absolute_qt_path("6.1.0"): print("No suitable qt version found!") sys.exit(1) - file_list = find_files(('.qml'), "Apps/Client/qml", git_staged_only) + file_list = find_files(('.qml'), os.path.abspath(os.path.join(os.getcwd(), "../")), git_staged_only) execute_threaded(file_list, format_file_function) if not git_staged_only: check_git_exit("QML Format")