|
|
|
@ -52,7 +52,7 @@ if T.TYPE_CHECKING: |
|
|
|
|
|
|
|
|
|
"""Keyword arguments for the Ui Compiler method.""" |
|
|
|
|
|
|
|
|
|
sources: T.Sequence[T.Union[FileOrString, build.CustomTarget]] |
|
|
|
|
sources: T.Sequence[T.Union[FileOrString, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]] |
|
|
|
|
extra_args: T.List[str] |
|
|
|
|
method: str |
|
|
|
|
|
|
|
|
@ -337,12 +337,19 @@ class QtBaseModule(ExtensionModule): |
|
|
|
|
@noPosargs |
|
|
|
|
@typed_kwargs( |
|
|
|
|
'qt.compile_ui', |
|
|
|
|
KwargInfo('sources', ContainerTypeInfo(list, (File, str), allow_empty=False), listify=True, required=True), |
|
|
|
|
KwargInfo( |
|
|
|
|
'sources', |
|
|
|
|
ContainerTypeInfo(list, (File, str, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList), allow_empty=False), |
|
|
|
|
listify=True, |
|
|
|
|
required=True, |
|
|
|
|
), |
|
|
|
|
KwargInfo('extra_args', ContainerTypeInfo(list, str), listify=True, default=[]), |
|
|
|
|
KwargInfo('method', str, default='auto') |
|
|
|
|
) |
|
|
|
|
def compile_ui(self, state: 'ModuleState', args: T.Tuple, kwargs: 'UICompilerKwArgs') -> ModuleReturnValue: |
|
|
|
|
"""Compile UI resources into cpp headers.""" |
|
|
|
|
if any(isinstance(s, (build.CustomTarget, build.CustomTargetIndex, build.GeneratedList)) for s in kwargs['sources']): |
|
|
|
|
FeatureNew.single_use('qt.compile_ui: custom_target or generator for "sources" keyword argument', '0.60.0', state.subproject) |
|
|
|
|
out = self._compile_ui_impl(state, kwargs) |
|
|
|
|
return ModuleReturnValue(out, [out]) |
|
|
|
|
|
|
|
|
|