From efdfdfa0fc74493a4cf0f93fb5a622cbfbb065b2 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Sat, 4 Jul 2020 02:13:31 +0200 Subject: [PATCH] Remove dead code Found by LGTM.com. Change-Id: I661e2287a6964b63d5b03c8913bc4b09f21ffdf1 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index b4f70c2654f..823be0d07b0 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2904,7 +2904,6 @@ def write_main_part( target_ref = name if typename == "Tool": target_ref = "${target_name}" - comment_line = "#" * 69 cm_fh.write(f"{spaces(indent)}qt_get_tool_target_name(target_name {name})\n") # Check for DESTDIR override @@ -3353,7 +3352,6 @@ def write_example( add_target = "" - qmldir = None if is_plugin: if "qml" in scope.get("QT"): # Get the uri from the destination directory @@ -3525,9 +3523,6 @@ def write_example( handling_first_scope = False - if qmldir: - write_qml_plugin_epilogue(cm_fh, binary_name, scope, qmldir, indent) - cm_fh.write( f"\ninstall(TARGETS {binary_name}\n" f' RUNTIME DESTINATION "${{INSTALL_EXAMPLEDIR}}"\n' @@ -3939,29 +3934,6 @@ def find_top_level_repo_project_file(project_file_path: str = "") -> Optional[st def handle_top_level_repo_tests_project(scope: Scope, cm_fh: IO[str]): - top_level_project_path = find_top_level_repo_project_file(scope.file_absolute_path) - if top_level_project_path: - # qtdeclarative - file_name = os.path.splitext(os.path.basename(top_level_project_path))[0] - - # declarative - file_name_without_qt = file_name[2:] - - # Qt::Declarative - qt_lib = map_qt_library(file_name_without_qt) - - # Found a mapping, adjust name. - if qt_lib != file_name_without_qt: - # QtDeclarative - qt_lib = f'{re.sub(r":", r"", qt_lib)}{"Tests"}' - else: - qt_lib += "Tests_FIXME" - else: - qt_lib = "Tests_FIXME" - - requires_content = expand_project_requirements(scope, skip_message=True) - if requires_content: - requires_content = f"\n\n{textwrap_indent(requires_content, spaces(3))}" content = dedent( f"""\