mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:57:00 +02:00
Don't modify URL on web entity on QML shutdown, remove tablet related code from web entity
This commit is contained in:
parent
1b612d373f
commit
e892694bf5
1 changed files with 1 additions and 16 deletions
|
@ -308,12 +308,7 @@ bool WebEntityRenderer::buildWebSurface(const TypedEntityPointer& entity) {
|
||||||
item->setProperty(URL_PROPERTY, _lastSourceUrl);
|
item->setProperty(URL_PROPERTY, _lastSourceUrl);
|
||||||
});
|
});
|
||||||
} else if (_contentType == ContentType::QmlContent) {
|
} else if (_contentType == ContentType::QmlContent) {
|
||||||
_webSurface->load(_lastSourceUrl, [this](QQmlContext* context, QObject* item) {
|
_webSurface->load(_lastSourceUrl);
|
||||||
if (item && item->objectName() == "tabletRoot") {
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
|
||||||
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", _webSurface.data());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
_fadeStartTime = usecTimestampNow();
|
_fadeStartTime = usecTimestampNow();
|
||||||
_webSurface->resume();
|
_webSurface->resume();
|
||||||
|
@ -330,16 +325,6 @@ void WebEntityRenderer::destroyWebSurface() {
|
||||||
if (webSurface) {
|
if (webSurface) {
|
||||||
--_currentWebCount;
|
--_currentWebCount;
|
||||||
QQuickItem* rootItem = webSurface->getRootItem();
|
QQuickItem* rootItem = webSurface->getRootItem();
|
||||||
// Explicitly set the web URL to an empty string, in an effort to get a
|
|
||||||
// faster shutdown of any chromium processes interacting with audio
|
|
||||||
if (rootItem && _contentType == ContentType::HtmlContent) {
|
|
||||||
rootItem->setProperty(URL_PROPERTY, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rootItem && rootItem->objectName() == "tabletRoot") {
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
|
||||||
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fix for crash in QtWebEngineCore when rapidly switching domains
|
// Fix for crash in QtWebEngineCore when rapidly switching domains
|
||||||
// Call stop on the QWebEngineView before destroying OffscreenQMLSurface.
|
// Call stop on the QWebEngineView before destroying OffscreenQMLSurface.
|
||||||
|
|
Loading…
Reference in a new issue