1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Fixed occasional crash on adblockcleanup

This commit is contained in:
nowrep 2011-08-05 11:02:44 +02:00
parent 61269f8c0a
commit c62f297349

View File

@ -175,7 +175,7 @@ void WebPage::addAdBlockRule(const QString &filter, const QUrl &url)
QWebElementCollection elements; QWebElementCollection elements;
elements.append(docElement.findAll("*[src=\"" + url.toString() + "\"]")); elements.append(docElement.findAll("*[src=\"" + url.toString() + "\"]"));
foreach (QWebElement element, elements) foreach (QWebElement element, elements)
element.removeFromDocument(); element.setAttribute("style", "display:none;");
} }
bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output) bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output)