diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2016-12-20 03:56:46 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-22 17:08:32 +0200 |
commit | 18c38df875ed99324c74dea2c6d9765f25c10ff8 (patch) | |
tree | 9e73de350c4939af86669b77711467b4856d439c /mesonbuild/modules/qt4.py | |
parent | 6f5a5622b94161ab851ec498f5a95a8ae181c785 (diff) | |
download | meson-18c38df875ed99324c74dea2c6d9765f25c10ff8.zip meson-18c38df875ed99324c74dea2c6d9765f25c10ff8.tar.gz meson-18c38df875ed99324c74dea2c6d9765f25c10ff8.tar.bz2 |
Add Generator.process_files to reduce code duplication.
Diffstat (limited to 'mesonbuild/modules/qt4.py')
-rw-r--r-- | mesonbuild/modules/qt4.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py index 2d89792..8df4f3e 100644 --- a/mesonbuild/modules/qt4.py +++ b/mesonbuild/modules/qt4.py @@ -140,22 +140,19 @@ class Qt4Module(): ui_kwargs = {'output' : 'ui_@BASENAME@.h', 'arguments' : ['-o', '@OUTPUT@', '@INPUT@']} ui_gen = build.Generator([self.uic], ui_kwargs) - ui_output = build.GeneratedList(ui_gen) - [ui_output.add_file(os.path.join(state.subdir, a)) for a in ui_files] + ui_output = ui_gen.process_files('Qt4 ui', ui_files, state) sources.append(ui_output) if len(moc_headers) > 0: moc_kwargs = {'output' : 'moc_@BASENAME@.cpp', 'arguments' : ['@INPUT@', '-o', '@OUTPUT@']} moc_gen = build.Generator([self.moc], moc_kwargs) - moc_output = build.GeneratedList(moc_gen) - [moc_output.add_file(os.path.join(state.subdir, a)) for a in moc_headers] + moc_output = moc_gen.process_files('Qt4 moc header', moc_headers, state) sources.append(moc_output) if len(moc_sources) > 0: moc_kwargs = {'output' : '@BASENAME@.moc', 'arguments' : ['@INPUT@', '-o', '@OUTPUT@']} moc_gen = build.Generator([self.moc], moc_kwargs) - moc_output = build.GeneratedList(moc_gen) - [moc_output.add_file(os.path.join(state.subdir, a)) for a in moc_sources] + moc_output = moc_gen.process_files('Qt4 moc source', moc_sources, state) sources.append(moc_output) return sources |