Commit 455058be authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile with unity support

parent e929ebeb
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
#include <QVector> #include <QVector>
#include <QWebEngineView> #include <QWebEngineView>
using namespace WebEngineViewer; using namespace WebEngineViewer;
template<typename Arg, typename R, typename C> struct InvokeWrapper { template<typename Arg, typename R, typename C>
struct InvokeWrapperWebAccessKey {
R *receiver; R *receiver;
void (C::*memberFunction)(Arg); void (C::*memberFunction)(Arg);
void operator()(Arg result) void operator()(Arg result)
...@@ -29,9 +30,9 @@ template<typename Arg, typename R, typename C> struct InvokeWrapper { ...@@ -29,9 +30,9 @@ template<typename Arg, typename R, typename C> struct InvokeWrapper {
template<typename Arg, typename R, typename C> template<typename Arg, typename R, typename C>
InvokeWrapper<Arg, R, C> invoke(R *receiver, void (C::*memberFunction)(Arg)) InvokeWrapperWebAccessKey<Arg, R, C> invokeWebAccessKey(R *receiver, void (C::*memberFunction)(Arg))
{ {
InvokeWrapper<Arg, R, C> wrapper = {receiver, memberFunction}; InvokeWrapperWebAccessKey<Arg, R, C> wrapper = {receiver, memberFunction};
return wrapper; return wrapper;
} }
...@@ -345,5 +346,5 @@ void WebEngineAccessKey::showAccessKeys() ...@@ -345,5 +346,5 @@ void WebEngineAccessKey::showAccessKeys()
d->mAccessKeyActivated = WebEngineAccessKeyPrivate::Activated; d->mAccessKeyActivated = WebEngineAccessKeyPrivate::Activated;
d->mWebEngine->page()->runJavaScript(WebEngineViewer::WebEngineAccessKeyUtils::script(), d->mWebEngine->page()->runJavaScript(WebEngineViewer::WebEngineAccessKeyUtils::script(),
WebEngineManageScript::scriptWordId(), WebEngineManageScript::scriptWordId(),
invoke(this, &WebEngineAccessKey::handleSearchAccessKey)); invokeWebAccessKey(this, &WebEngineAccessKey::handleSearchAccessKey));
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment