addressing comments

This commit is contained in:
amer cerkic 2019-07-24 14:30:43 -07:00
parent f94b082946
commit bea31237b7
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();
}
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);
}
_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 (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 };
InteractiveWindowProxy *_interactiveWindowProxy{ nullptr };
std::unique_ptr<InteractiveWindowProxy> _interactiveWindowProxy{ nullptr };
};
typedef InteractiveWindow* InteractiveWindowPointer;