mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 21:28:54 +02:00
Merge pull request #8940 from hyperlogic/bug-fix/web-engine-crash-when-swiching-domains
Fix for crash in QtWebEngineCore when rapidly switching domains
This commit is contained in:
commit
97f622f003
2 changed files with 11 additions and 0 deletions
|
@ -27,6 +27,7 @@ Item {
|
||||||
|
|
||||||
WebEngineView {
|
WebEngineView {
|
||||||
id: root
|
id: root
|
||||||
|
objectName: "webEngineView"
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -326,7 +326,17 @@ void RenderableWebEntityItem::handlePointerEvent(const PointerEvent& event) {
|
||||||
void RenderableWebEntityItem::destroyWebSurface() {
|
void RenderableWebEntityItem::destroyWebSurface() {
|
||||||
if (_webSurface) {
|
if (_webSurface) {
|
||||||
--_currentWebCount;
|
--_currentWebCount;
|
||||||
|
|
||||||
|
QQuickItem* rootItem = _webSurface->getRootItem();
|
||||||
|
if (rootItem) {
|
||||||
|
QObject* obj = rootItem->findChild<QObject*>("webEngineView");
|
||||||
|
if (obj) {
|
||||||
|
QMetaObject::invokeMethod(obj, "stop");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_webSurface->pause();
|
_webSurface->pause();
|
||||||
|
|
||||||
_webSurface->disconnect(_connection);
|
_webSurface->disconnect(_connection);
|
||||||
QObject::disconnect(_mousePressConnection);
|
QObject::disconnect(_mousePressConnection);
|
||||||
_mousePressConnection = QMetaObject::Connection();
|
_mousePressConnection = QMetaObject::Connection();
|
||||||
|
|
Loading…
Reference in a new issue