mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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);
|
||||
});
|
||||
} else if (_contentType == ContentType::QmlContent) {
|
||||
_webSurface->load(_lastSourceUrl, [this](QQmlContext* context, QObject* item) {
|
||||
if (item && item->objectName() == "tabletRoot") {
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", _webSurface.data());
|
||||
}
|
||||
});
|
||||
_webSurface->load(_lastSourceUrl);
|
||||
}
|
||||
_fadeStartTime = usecTimestampNow();
|
||||
_webSurface->resume();
|
||||
|
@ -330,16 +325,6 @@ void WebEntityRenderer::destroyWebSurface() {
|
|||
if (webSurface) {
|
||||
--_currentWebCount;
|
||||
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
|
||||
// Call stop on the QWebEngineView before destroying OffscreenQMLSurface.
|
||||
|
|
Loading…
Reference in a new issue