diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-17 10:58:31 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-11-01 19:14:14 +0200 |
commit | 0de7e7a0664b7521dd722faf68a5bcf988ebb011 (patch) | |
tree | e7d8127579e8cd45f3fc5ba667e05432bd9b5a91 /util/locale_database/localetools.py | |
parent | b77da049bc76ca809e7e2b58e0d554a3bf865b56 (diff) |
LocaleDB: Make passing qtbase root dir on command-lines optional
We can easily enough obtain the root of the present source tree using
the value of __file__, so might as well do so.
Change-Id: If14773ac1127278b6018a090c0b376437b9c6eec
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'util/locale_database/localetools.py')
-rw-r--r-- | util/locale_database/localetools.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/locale_database/localetools.py b/util/locale_database/localetools.py index b50f5a8ee3..a33ace4eb1 100644 --- a/util/locale_database/localetools.py +++ b/util/locale_database/localetools.py @@ -16,6 +16,9 @@ from contextlib import ExitStack, contextmanager from pathlib import Path from tempfile import NamedTemporaryFile +qtbase_root = Path(__file__).parents[2] +assert qtbase_root.name == 'qtbase' + class Error (Exception): def __init__(self, msg, *args): super().__init__(msg, *args) |