pro2cmake.py: Parse qmldir import statements with versions
You can write the following in a qmldir file these days: import QtQuick auto import QtQml 2.4 pro2cmake should understand and convert these to cmake. Change-Id: Ica1728de0c8d7a0b2b5aa341d20e60b23dfa7fe1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
a641720151
commit
fd52a6fcb9
@ -681,7 +681,10 @@ class QmlDir:
|
||||
elif entries[0] == "designersupported":
|
||||
self.designer_supported = True
|
||||
elif entries[0] == "import":
|
||||
self.imports.append(entries[1])
|
||||
if len(entries) == 3:
|
||||
self.imports.append(entries[1] + "/" + entries[2])
|
||||
else:
|
||||
self.imports.append(entries[1])
|
||||
elif len(entries) == 3:
|
||||
self.handle_file(entries[0], entries[1], entries[2])
|
||||
else:
|
||||
@ -3399,7 +3402,7 @@ def write_example(
|
||||
raise RuntimeError(
|
||||
"Only qmldir import statements expected in conditional scope!"
|
||||
)
|
||||
import_list.append(qml_import[len("import ") :])
|
||||
import_list.append(qml_import[len("import ") :].replace(" ", "/"))
|
||||
if len(import_list) == 0:
|
||||
continue
|
||||
|
||||
@ -3703,7 +3706,7 @@ def write_qml_plugin(
|
||||
raise RuntimeError(
|
||||
"Only qmldir import statements expected in conditional scope!"
|
||||
)
|
||||
import_list.append(qml_import[len("import ") :])
|
||||
import_list.append(qml_import[len("import ") :].replace(" ", "/"))
|
||||
if len(import_list) == 0:
|
||||
continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user