summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-11-22 18:26:41 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2019-11-23 07:07:45 +0000
commit4ff9d6d52384f7db4ae1713839928f434025e4ca (patch)
tree760c42ac4ccee156f5f4c770e5d3ca37a6b44764 /util
parenta640db0180f5217f8dc45687c27ea615ea013ca2 (diff)
Fix pro2cmake formatting
... by running make format. Change-Id: I523a48abd2c483107f5c16c24daa695fcc0a55e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py18
-rwxr-xr-xutil/cmake/run_pro2cmake.py9
2 files changed, 12 insertions, 15 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 1d241efc8e..b0ff3a8171 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -1396,9 +1396,11 @@ def unwrap_if(input_string):
def map_condition(condition: str) -> str:
# Some hardcoded cases that are too bothersome to generalize.
- condition = re.sub(r"qtConfig\(opengles\.\)",
- r"(QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR QT_FEATURE_opengles31 OR QT_FEATURE_opengles32)",
- condition)
+ condition = re.sub(
+ r"qtConfig\(opengles\.\)",
+ r"(QT_FEATURE_opengles2 OR QT_FEATURE_opengles3 OR QT_FEATURE_opengles31 OR QT_FEATURE_opengles32)",
+ condition,
+ )
condition = re.sub(
r"qtConfig\(opengl\(es1\|es2\)\?\)",
r"QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3",
@@ -1510,12 +1512,10 @@ def map_condition(condition: str) -> str:
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)
# some defines replacements
- condition = re.sub(r"DEFINES___contains___QT_NO_CURSOR",
- r"(NOT QT_FEATURE_cursor)",
- condition)
- condition = re.sub(r"DEFINES___contains___QT_NO_TRANSLATION",
- r"(NOT QT_FEATURE_translation)",
- condition)
+ condition = re.sub(r"DEFINES___contains___QT_NO_CURSOR", r"(NOT QT_FEATURE_cursor)", condition)
+ condition = re.sub(
+ r"DEFINES___contains___QT_NO_TRANSLATION", r"(NOT QT_FEATURE_translation)", condition
+ )
cmake_condition = ""
for part in condition.split():
diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py
index ce4a952f94..4a12c57b83 100755
--- a/util/cmake/run_pro2cmake.py
+++ b/util/cmake/run_pro2cmake.py
@@ -74,10 +74,7 @@ def parse_command_line() -> argparse.Namespace:
help="Run pro2cmake with --is-example flag.",
)
parser.add_argument(
- "--count",
- dest="count",
- help="How many projects should be converted.",
- type=int,
+ "--count", dest="count", help="How many projects should be converted.", type=int
)
parser.add_argument(
"--offset",
@@ -227,9 +224,9 @@ def main() -> None:
all_files = find_all_pro_files(base_path, args)
if args.offset:
- all_files = all_files[args.offset:]
+ all_files = all_files[args.offset :]
if args.count:
- all_files = all_files[:args.count]
+ all_files = all_files[: args.count]
files_count = len(all_files)
failed_files = run(all_files, pro2cmake, args)