modules/qt: Fix annotations for state.find_program
Because this too, has the wrong assumptions
This commit is contained in:
parent
a67f04eb23
commit
afa8e31cf3
|
@ -108,7 +108,7 @@ class QtBaseModule(ExtensionModule):
|
|||
self.qt_version = qt_version
|
||||
# It is important that this list does not change order as the order of
|
||||
# the returned ExternalPrograms will change as well
|
||||
self.tools: T.Dict[str, ExternalProgram] = {
|
||||
self.tools: T.Dict[str, T.Union[ExternalProgram, build.Executable]] = {
|
||||
'moc': NonExistingExternalProgram('moc'),
|
||||
'uic': NonExistingExternalProgram('uic'),
|
||||
'rcc': NonExistingExternalProgram('rcc'),
|
||||
|
@ -152,7 +152,7 @@ class QtBaseModule(ExtensionModule):
|
|||
arg = ['-v']
|
||||
|
||||
# Ensure that the version of qt and each tool are the same
|
||||
def get_version(p: ExternalProgram) -> str:
|
||||
def get_version(p: T.Union[ExternalProgram, build.Executable]) -> str:
|
||||
_, out, err = Popen_safe(p.get_command() + arg)
|
||||
if name == 'lrelease' or not qt_dep.version.startswith('4'):
|
||||
care = out
|
||||
|
@ -587,7 +587,7 @@ class QtBaseModule(ExtensionModule):
|
|||
ts = os.path.basename(ts)
|
||||
else:
|
||||
outdir = state.subdir
|
||||
cmd: T.List[T.Union[ExternalProgram, str]] = [self.tools['lrelease'], '@INPUT@', '-qm', '@OUTPUT@']
|
||||
cmd: T.List[T.Union[ExternalProgram, build.Executable, str]] = [self.tools['lrelease'], '@INPUT@', '-qm', '@OUTPUT@']
|
||||
lrelease_target = build.CustomTarget(
|
||||
f'qt{self.qt_version}-compile-{ts}',
|
||||
outdir,
|
||||
|
|
Loading…
Reference in New Issue