diff options
author | Andy Shaw <andy.shaw@qt.io> | 2016-11-28 15:26:33 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2016-11-29 12:23:19 +0000 |
commit | 22697dac66be3d380540546dfe7d68094befb560 (patch) | |
tree | ddb6c0e599602a373497bd9187ef90b3f23affa8 | |
parent | 5c5c135ba8f82161f3e93b367ffacd63dc9111a3 (diff) |
Generate the qmldir dynamically so we can include the depends line
This ensures that the dependency on QtWebEngine is there for the
qml plugin.
Task-number: QTBUG-57284
Change-Id: Ia4fc8ec048cc7f0eaf16e93e3fc5ab74c5885465
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r-- | src/imports/imports.pro | 9 | ||||
-rw-r--r-- | src/imports/qmldir | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 84fe775..eefb3eb 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -7,6 +7,15 @@ QT += qml quick webview-private SOURCES += \ $$PWD/webview.cpp +QMLDIR_CONT = \ + "module QtWebView" \ + "plugin declarative_webview" \ + "typeinfo plugins.qmltypes" \ + "classname QWebViewModule" +qtHaveModule(webengine):QMLDIR_CONT += "depends QtWebEngine 1.0" + +QMLDIR_FILE = $$_PRO_FILE_PWD_/qmldir +write_file($$QMLDIR_FILE, QMLDIR_CONT)|error("Aborting.") load(qml_plugin) OTHER_FILES += qmldir diff --git a/src/imports/qmldir b/src/imports/qmldir deleted file mode 100644 index d8d92f3..0000000 --- a/src/imports/qmldir +++ /dev/null @@ -1,4 +0,0 @@ -module QtWebView -plugin declarative_webview -typeinfo plugins.qmltypes -classname QWebViewModule |