aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-06-01 21:18:49 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-06-15 12:48:53 -0700
commit2043461b87eb93a50fc2ede3783efb157261ed86 (patch)
tree6549adb2f8c1bfcbb4c816d6bd5332d55038d204 /mesonbuild/modules/qt.py
parent35bdaada1dfb64366f1533a79fea670502f69732 (diff)
downloadmeson-2043461b87eb93a50fc2ede3783efb157261ed86.zip
meson-2043461b87eb93a50fc2ede3783efb157261ed86.tar.gz
meson-2043461b87eb93a50fc2ede3783efb157261ed86.tar.bz2
build: Pass name of generator to initializer
It's really a property of the Generator what name to use, not something that should be passed to each call to process files.
Diffstat (limited to 'mesonbuild/modules/qt.py')
-rw-r--r--mesonbuild/modules/qt.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index f328027..adfc8e2 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -348,8 +348,9 @@ class QtBaseModule(ExtensionModule):
gen = build.Generator(
self.uic,
kwargs['extra_args'] + ['-o', '@OUTPUT@', '@INPUT@'],
- ['ui_@BASENAME@.h'])
- out = gen.process_files(f'Qt{self.qt_version} ui', kwargs['sources'], state) # type: ignore
+ ['ui_@BASENAME@.h'],
+ name=f'Qt{self.qt_version} ui')
+ out = gen.process_files(kwargs['sources'], state) # type: ignore
return ModuleReturnValue(out, [out])
@FeatureNew('qt.compile_moc', '0.59.0')
@@ -382,11 +383,15 @@ class QtBaseModule(ExtensionModule):
arguments = kwargs['extra_args'] + inc + compile_args + ['@INPUT@', '-o', '@OUTPUT@']
if kwargs['headers']:
- moc_gen = build.Generator(self.moc, arguments, ['moc_@BASENAME@.cpp'])
- output.append(moc_gen.process_files(f'Qt{self.qt_version} moc header', kwargs['headers'], state)) # type: ignore
+ moc_gen = build.Generator(
+ self.moc, arguments, ['moc_@BASENAME@.cpp'],
+ name=f'Qt{self.qt_version} moc header')
+ output.append(moc_gen.process_files(kwargs['headers'], state)) # type: ignore
if kwargs['sources']:
- moc_gen = build.Generator(self.moc, arguments, ['@BASENAME@.moc'])
- output.append(moc_gen.process_files(f'Qt{self.qt_version} moc source', kwargs['sources'], state)) # type: ignore
+ moc_gen = build.Generator(
+ self.moc, arguments, ['@BASENAME@.moc'],
+ name=f'Qt{self.qt_version} moc source')
+ output.append(moc_gen.process_files(kwargs['sources'], state)) # type: ignore
return ModuleReturnValue(output, [output])