reverting commit:

This commit is contained in:
amer cerkic 2019-07-24 15:43:31 -07:00
parent bea31237b7
commit 3315271493
2 changed files with 7 additions and 7 deletions

View file

@ -70,7 +70,7 @@ void QmlWindowProxy::parentNativeWindowToMainWindow() {
}
void InteractiveWindowProxy::emitScriptEvent(const QVariant& scriptMessage){
// emit scriptEventReceived(scriptMessage);
emit scriptEventReceived(scriptMessage);
}
void InteractiveWindowProxy::emitWebEvent(const QVariant& webMessage) {
@ -137,11 +137,11 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
presentationMode = (InteractiveWindowPresentationMode) properties[PRESENTATION_MODE_PROPERTY].toInt();
}
_interactiveWindowProxy = std::make_unique<InteractiveWindowProxy>();
QObject::connect(_interactiveWindowProxy.get(), &InteractiveWindowProxy::webEventReceived,
this, &InteractiveWindow::emitWebEvent, Qt::QueuedConnection);
QObject::connect(this, &InteractiveWindow::scriptEventReceived,
_interactiveWindowProxy.get(), &InteractiveWindowProxy::emitScriptEvent, Qt::QueuedConnection);
if (!_interactiveWindowProxy) {
_interactiveWindowProxy = new InteractiveWindowProxy();
QObject::connect(_interactiveWindowProxy, &InteractiveWindowProxy::webEventReceived, this, &InteractiveWindow::emitWebEvent, Qt::QueuedConnection);
QObject::connect(this, &InteractiveWindow::scriptEventReceived, _interactiveWindowProxy, &InteractiveWindowProxy::emitScriptEvent, Qt::QueuedConnection);
}
if (properties.contains(DOCKED_PROPERTY) && presentationMode == InteractiveWindowPresentationMode::Native) {
QVariantMap nativeWindowInfo = properties[DOCKED_PROPERTY].toMap();

View file

@ -325,7 +325,7 @@ protected slots:
private:
std::shared_ptr<QmlWindowProxy> _qmlWindowProxy;
std::shared_ptr<DockWidget> _dockWidget { nullptr };
std::unique_ptr<InteractiveWindowProxy> _interactiveWindowProxy{ nullptr };
InteractiveWindowProxy *_interactiveWindowProxy{ nullptr };
};
typedef InteractiveWindow* InteractiveWindowPointer;