disconnect if the page changes but we don't own it

svn path=/trunk/KDE/kdelibs/; revision=884087
This commit is contained in:
Aaron J. Seigo 2008-11-14 08:04:23 +00:00
parent c7cb88677c
commit 2fc960f455

View File

@ -103,8 +103,12 @@ void WebView::setPage(QWebPage *page)
return;
}
if (d->page && d->page->parent() == this) {
delete d->page;
if (d->page) {
if (d->page->parent() == this) {
delete d->page;
} else {
disconnect(d->page, 0, this, 0);
}
}
d->page = page;