[Webkit-unassigned] [Bug 32953] [Qt] Qt DRT: respect window.close() and window.closed()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 30 06:03:37 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32953
Jakub Wieczorek <faw217 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |faw217 at gmail.com
--- Comment #8 from Jakub Wieczorek <faw217 at gmail.com> 2009-12-30 06:03:35 PST ---
> +void DumpRenderTree::windowCloseRequested()
> +{
> + QWebPage* page = qobject_cast<QWebPage*>(sender());
> + for (int i = 0; i < windows.size(); ++i) {
> + QObject* container = windows.at(i);
> + QWebPage* childPage = static_cast<QWebPage*>(container->findChild<WebPage *>());
> + if (childPage == page) {
> + windows.takeAt(i);
> + container->deleteLater();
> + break;
> + }
> + }
> +}
I believe QWebPage::parent() would give you the correct container, no? Then you
can simply do:
QWebPage* page = qobject_cast<QWebPage*>(sender());
QObject* container = page->parent();
windows.removeAll(container);
container->deleteLater();
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list