diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-28 16:35:25 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-28 20:43:44 +0000 |
commit | 88b7f64e7385e51831b3a852c88d6bbcdc665d87 (patch) | |
tree | d8e03b04fec52bf9aa2354f346a36eaee5b826bb /util | |
parent | 3c6b0a07da2bc2f39d7355e90c37387fc29d5fd8 (diff) |
Fix example generation without qmldir file
Do not return when no qmldir file is present and no dynamic qmldir
information is set.
Change-Id: I04e458f69e4e4a6ec9b1e7ca7ba0b0f7520996f7
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 8c82a796b9..627a0402d8 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -3097,13 +3097,11 @@ def write_example( qmldir_file_path = qmldir_file_path_list[0] if qmldir_file_path_list else "qmldir" qmldir_file_path = os.path.join(os.getcwd(), qmldir_file_path[0]) + dynamic_qmldir = scope.get("DYNAMIC_QMLDIR") if os.path.exists(qmldir_file_path): qml_dir = QmlDir() qml_dir.from_file(qmldir_file_path) - else: - dynamic_qmldir = scope.get("DYNAMIC_QMLDIR") - if not dynamic_qmldir: - return None + elif dynamic_qmldir: qml_dir = QmlDir() qml_dir.from_lines(dynamic_qmldir) qml_dir_dynamic_imports = True |