Commit 388a71d6 authored by Jocelyn Turcotte's avatar Jocelyn Turcotte Committed by The Qt Project
Browse files

Properly cleanup the old page when attaching a new one


This patch fixes two issues:
- The RWHV delegate of the old page would not be detached from the view
  when attaching a new page to that view. Call reattachRWHV as we do on
  the new page to make sure that the delegate gets unparented from the
  view.
- QtWebKit documents that a page having the view as its QObject parent
  should be deleted when setPage is called with a new page. This would
  cause QupZilla to leak the page when opening a new window through a
  link.

This also adds a workaround to avoid a crash when unparenting the
delegate where QOpenGLWidget would try to call paintGL without a valid
QSurface.

Change-Id: Icd2659f441d2220c26dc175d66424e6c26125861
Reviewed-by: default avatarAndras Becsi <andras.becsi@digia.com>
parent f5ad05b1
Showing with 8 additions and 0 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment