summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt5.py
AgeCommit message (Collapse)Author
2024-04-09modules: rename qt.py -> _qt.pyDylan Baker
Since it's an implementation detail, and shouldn't be exposed. This also helps give better error messages when a user writes `import('qt')`, since otherwise you get an error about `qt doesn't have an initialize method`, and now you get `qt module doesn't exist`.
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-01-10modules: fully type the Qt* modulesDylan Baker
The base module is fully typed, but the numbered version are not, though it's pretty trivial to do so.
2022-08-17modules: use module level information about new and deprecationDylan Baker
Instead of using FeatureNew/FeatureDeprecated in the module. The goal here is to be able to handle information about modules in a single place, instead of having to handle it separately. Each module simply defines some metadata, and then the interpreter handles the rest.
2020-07-13qt module: rcc supports depfiles now, given a recent enough version of Qt5Eli Schwartz
Add depfile support to generated targets for Qt >= 5.14. Move warning into the module init itself, to check if the version is too old before issuing. Also tweak the wording itself, to advise upgrading to a suitable version of Qt5 instead of advising to wait for a Qt bug to be fixed.
2020-07-05Don't make unactionable warnings fatalNirbheek Chauhan
Some warnings are out of the user's control, such as the RCC QT bug, or the GNU windres bug, or our informational warning about auto-disabling of options when -Db_bitcode is enabled. Such warnings should not be fatal when --fatal-meson-warnings is passed because there's no action that the user can take to fix it. The only purpose it serves is to prevent people who use those features from using --fatal-meson-warnings.
2018-11-14dependencies/ui: Allow qt compilers and qmake to be specified in native fileDylan Baker
2018-04-15Updated all modules to work with the new API.Jussi Pakkanen
2017-10-10Factorized Qt4 and Qt5 modules in one base class.Alexis Jeandet
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-01Added include directory argument for Qt's Moc which is needed to build plugins.Alexis Jeandet
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-21flake8: Clean up complained-about unused importsLuke Shumaker
This also adds a "# noqa: F401" comment on an unused "import lzma", which we are using it in a try/except block that is being used to check if the lzma module is importable; of course it is unused. v2: This turned out to be a little tricky. mesonbuild/modules/__init__.py had the "unused" import: from ..interpreterbase import permittedKwargs, noKwargs However, that meant that the various modules could do things like: from . import noKwargs # "." is "mesonbuild.modules" Which breaks when you remove __init__.py's "unused" import. I could have tagged that import with "# noqa: F401", but instead I chose to have each of the module import directly from "..interpreterbase" instead of ".".
2017-09-18Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.Alexis Jeandet
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-06-26Fixed issues raised in review.Jussi Pakkanen
2017-06-26Fixed the remaining modules.Jussi Pakkanen
2017-04-09Add an option to dependencies called 'method'. This can be used toAaron Small
configure a detection method, for those types of dependencies that have more than one means of detection. The default detection methods are unchanged if 'method' is not specified, and all dependencies support the method 'auto', which is the same as not specifying a method. The dependencies which do support multiple detection methods additionally support other values, depending on the dependency.
2017-02-19find_program: Fix implementation of .path()Nirbheek Chauhan
And actually test that prog.path() works. The earlier test was just running the command without checking if it succeeded. Also make everything use prog.get_command() or get_path() instead of accessing the internal member prog.fullpath directly.
2017-01-11style: [E502] the backslash is redundant between bracketsMike Sinkovsky
2017-01-09There are two different kinds of extensions: modules that create newJussi Pakkanen
objects directly and snippets that just call into interpreter methods.
2017-01-06Fix a few more modules.Jussi Pakkanen
2017-01-02style: fix E127 violationsIgor Gnatenko
E127: continuation line over-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E124 violationsIgor Gnatenko
E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-31Fix space before :.Jussi Pakkanen
2016-12-22Add Generator.process_files to reduce code duplication.Elliott Sales de Andrade
2016-12-19tree-wide: remove unused importsIgor Gnatenko
./setup.py:17:1: F401 'os' imported but unused import os ^ ./setup.py:37:1: F401 'stat.ST_MODE' imported but unused from stat import ST_MODE ^ ./run_tests.py:17:1: F401 'os' imported but unused import subprocess, sys, os ^ ./run_tests.py:18:1: F401 'shutil' imported but unused import shutil ^ ./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency ^ ./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused from . import coredata ^ ./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused import os, sys, subprocess, shutil, uuid, re ^ ./mesonbuild/interpreter.py:32:1: F401 're' imported but unused import os, sys, subprocess, shutil, uuid, re ^ ./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused import os, stat, glob, subprocess, shutil ^ ./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused import platform, subprocess, operator, os, shutil, re, sys ^ ./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused import os, subprocess ^ ./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused from .. import coredata, build ^ ./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused import sys, os ^ ./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused import subprocess ^ ./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused import os, sys, subprocess ^ ./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused import sys, os ^ ./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException ^ ./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused import re ^ ./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused import os ^ ./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused import sys, os ^ ./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused import sys, shutil, subprocess ^ ./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused import os ^ ./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused import os ^ ./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused import sys, shutil, subprocess ^ Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18Qt: Allow passing a name arg to preprocess()Nirbheek Chauhan
This sets a unique name for the CustomTarget and the output cpp file. Closes #959
2016-12-11Use universal_newlines=True for all Popen callsNirbheek Chauhan
Instead of adding it everywhere manually, create a wrapper called mesonlib.Popen_safe and use that everywhere that we call an executable and extract its output. This will also allow us to tweak it to do more/different things if needed for some locales and/or systems. Closes #1079
2016-11-11qt4, qt5 modules: Improve moc/uic/rcc detectionNirbheek Chauhan
Instead of blindly searching in PATH, use Qt5Dependency.compilers_detect() (same for qt4) to get moc/uic/rcc. This is much more robust, and it improves the chances that the correct ones will be found. We still manually verify for now because the fallback in dependencies.py for searching is stll to look in PATH for backwards-compat, and because people probably have setups like that. Also sync the qt4 module with the qt5 module w.r.t. resource compilation and make the compiled qrc.cpp file unique in terms of the framework version used (4 vs 5). This is needed for the test to work properly, which now covers both Qt4 and 5.
2016-11-11qt4/qt5: Print a message when moc/uic/rcc aren't foundNirbheek Chauhan
Without this a strange exception is spewed that no one would be able to understand. Finding each of those compilers isn't a problem unless sources are specified that require those compilers, so only error out in those cases. Closes #758
2016-11-08Implement mlog.warning and use it everywhere for warningsNirbheek Chauhan
Prepends the string with 'WARNING:' in ANSI yellow. Closes https://github.com/mesonbuild/meson/issues/961
2016-05-30Make sure outputs do not contain stray path segments.Jussi Pakkanen
2016-05-29Can have multiple Qt resource files in a single target. Closes #572.Jussi Pakkanen
2016-04-01Move MesonException from coredata to mesonlib.Hemmo Nieminen
2016-01-31Text clarification.Jussi Pakkanen
2016-01-16Renamed meson package to mesonbuild so that we can have a script named meson ↵Jussi Pakkanen
in the same toplevel dir.