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>
This commit is contained in:
parent
3c6b0a07da
commit
88b7f64e73
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user