QWebChannel is only used if WebEngine is also available.
This converts scripting support into an optional feature which is only enabled if both dependencies are available.
davidedmundson |
Plasma |
QWebChannel is only used if WebEngine is also available.
This converts scripting support into an optional feature which is only enabled if both dependencies are available.
Still builds.
No Linters Available |
No Unit Test Coverage |
Buildable 23133 | |
Build 23151: arc lint + arc unit |
I need some input on how to express HAVE_QTWEBENGINEWIDGETS with this. Currently it would fail to build if Qt5WebEngineWidgets is installed but Qt5WebChannel isn't.
Currently processui/scripting.cpp has this:
#if HAVE_QTWEBENGINEWIDGETS #include <QWebChannel> ... #endif
So Qt5WebEngineWidgets without Qt5WebChannel will fail to build and Qt5WebChannel without Qt5WebEngineWidgets leads to scripting support getting disabled.
My question is what the right way to handle this is. List both as optional dependencies and use #if HAVE_QTWEBENGINEWIDGETS && HAVE_QTWEBCHANNEL instead or raise a cmake error out in the former case?
CMakeLists.txt | ||
---|---|---|
86 | Should you add a message in case one of the two is not found? |
CMakeLists.txt | ||
---|---|---|
86 | In that case WEBENGINE_SCRIPTING_ENABLED is FALSE and it'll print that Scripting plugin support is not enabled. At least in theory. |