diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-12-15 11:02:37 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-12-15 13:26:36 +0100 |
| commit | a97ce27f93abdafc023d1ca17b66170e6202039c (patch) | |
| tree | 608527e49c62d5b30fce395fd5927b565eaa0721 /sources/pyside-tools | |
| parent | 3f55d2fdef9e86b7588620dbc2caf1d8b82e2d4e (diff) | |
Project Tool: Fix QML issues on Windows
- Adapt the glob pattern for metatypes to Windows (no build indicator)
- Fix qtpaths6 evaluation (split on ':' only once to prevent
it from splitting on drive letters)
Pick-to: 6.4
Change-Id: I234ce2d462cca67ed0b142edb3a6e8420e4cb125
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside-tools')
| -rw-r--r-- | sources/pyside-tools/project/__init__.py | 2 | ||||
| -rw-r--r-- | sources/pyside-tools/project/project_data.py | 5 | ||||
| -rw-r--r-- | sources/pyside-tools/project/utils.py | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sources/pyside-tools/project/__init__.py b/sources/pyside-tools/project/__init__.py index 60e3a5192..39dcef345 100644 --- a/sources/pyside-tools/project/__init__.py +++ b/sources/pyside-tools/project/__init__.py @@ -17,7 +17,7 @@ QML_IMPORT_MAJOR_VERSION = "QML_IMPORT_MAJOR_VERSION" QML_IMPORT_MINOR_VERSION = "QML_IMPORT_MINOR_VERSION" QT_MODULES = "QT_MODULES" -METATYPES_JSON_SUFFIX = "_metatypes.json" +METATYPES_JSON_SUFFIX = "metatypes.json" from .utils import (run_command, requires_rebuild, remove_path, package_dir, qtpaths, qt_metatype_json_dir, resolve_project_file) diff --git a/sources/pyside-tools/project/project_data.py b/sources/pyside-tools/project/project_data.py index 991e5b505..05235fefc 100644 --- a/sources/pyside-tools/project/project_data.py +++ b/sources/pyside-tools/project/project_data.py @@ -115,7 +115,10 @@ class QmlProjectData: meta_dir = qt_metatype_json_dir() for mod in self._qt_modules: mod_id = mod[2:].lower() - pattern = f"qt6{mod_id}_*{METATYPES_JSON_SUFFIX}" + pattern = f"qt6{mod_id}_*" + if sys.platform != "win32": + pattern += "_" # qt6core_debug_metatypes.json (Linux) + pattern += METATYPES_JSON_SUFFIX for f in meta_dir.glob(pattern): foreign_files.append(os.fspath(f)) break diff --git a/sources/pyside-tools/project/utils.py b/sources/pyside-tools/project/utils.py index e535c675f..db92aeb7f 100644 --- a/sources/pyside-tools/project/utils.py +++ b/sources/pyside-tools/project/utils.py @@ -65,7 +65,7 @@ def qtpaths() -> Dict[str, str]: if not _qtpaths_info: output = subprocess.check_output([QTPATHS_CMD, "--query"]) for line in output.decode("utf-8").split("\n"): - tokens = line.strip().split(":") + tokens = line.strip().split(":", maxsplit=1) # "Path=C:\..." if len(tokens) == 2: _qtpaths_info[tokens[0]] = tokens[1] return _qtpaths_info |
