Fix regular expression for add_qml_module

Values such as Foo.2 would no longer be converted into Foo due to an
error in the regular expression.

Change-Id: I6a11d02662782094f5b264f86a930d9aaf002c77
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-08-06 15:15:38 +02:00
parent d943252741
commit 9ca1d79539

View File

@ -1974,7 +1974,7 @@ def write_qml_plugin(cm_fh: typing.IO[str],
if import_name:
extra_lines.append('URI "{}"'.format(import_name))
else:
uri = re.sub('\\.\\d+\\.', '.',uri)
uri = re.sub('\\.\\d+', '', uri)
extra_lines.append('URI "{}"'.format(uri))
import_version = scope.get_string('IMPORT_VERSION')