Fix invalid condition in module generation

Fix invalid condition which would cause valid qt modules not to be
written out as modules.

Change-Id: Id4b408f2502a34c011595c4602145b6980ee9d58
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-10-10 16:47:17 +02:00
parent f1be97e01e
commit 20f4f50a3a

View File

@ -2979,12 +2979,12 @@ def handle_app_or_lib(
elif is_plugin: elif is_plugin:
assert not is_example assert not is_example
target = write_plugin(cm_fh, scope, indent=indent) target = write_plugin(cm_fh, scope, indent=indent)
elif is_lib and "qt_module" in scope.get("_LOADED"): elif is_lib and not "qt_module" in scope.get("_LOADED"):
assert not is_example
target = write_module(cm_fh, scope, indent=indent)
elif is_lib:
assert not is_example assert not is_example
target = write_generic_library(cm_fh, scope, indent=indent) target = write_generic_library(cm_fh, scope, indent=indent)
elif is_lib or "qt_module" in scope.get("_LOADED"):
assert not is_example
target = write_module(cm_fh, scope, indent=indent)
elif "qt_tool" in scope.get("_LOADED"): elif "qt_tool" in scope.get("_LOADED"):
assert not is_example assert not is_example
target = write_tool(cm_fh, scope, indent=indent) target = write_tool(cm_fh, scope, indent=indent)