qt module: correctly register a found tool and stop looking for it

Regression in commit d7ac2f1065 since
self.{tool_name} is not how it used to be tracked, and the "found"
dictionary is a legacy of the old location.
pull/9239/head
Eli Schwartz 3 years ago
parent 6c908a04d7
commit 7171d22f5f
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/modules/qt.py

@ -122,8 +122,6 @@ class QtBaseModule(ExtensionModule):
# It is important that this list does not change order as the order of # It is important that this list does not change order as the order of
# the returned ExternalPrograms will change as well # the returned ExternalPrograms will change as well
bins = ['moc', 'uic', 'rcc', 'lrelease'] bins = ['moc', 'uic', 'rcc', 'lrelease']
found = {b: NonExistingExternalProgram(name=f'{b}-qt{qt_dep.qtver}')
for b in bins}
wanted = f'== {qt_dep.version}' wanted = f'== {qt_dep.version}'
def gen_bins() -> T.Generator[T.Tuple[str, str], None, None]: def gen_bins() -> T.Generator[T.Tuple[str, str], None, None]:
@ -136,7 +134,7 @@ class QtBaseModule(ExtensionModule):
yield b, b yield b, b
for b, name in gen_bins(): for b, name in gen_bins():
if found[name].found(): if getattr(self, name).found():
continue continue
if name == 'lrelease': if name == 'lrelease':

Loading…
Cancel
Save