Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/qwebplugins/clicktoflash/clicktoflash.cpp b/src/qwebplugins/clicktoflash/clicktoflash.cpp
- index 9c193b0..3cb085c 100644
- --- a/src/qwebplugins/clicktoflash/clicktoflash.cpp
- +++ b/src/qwebplugins/clicktoflash/clicktoflash.cpp
- @@ -123,7 +123,7 @@ void ClickToFlash::load(bool loadAll)
- QWebElement element;
- foreach (element, elements) {
- if (!loadAll) {
- - if (!element.evaluateJavaScript(QLatin1String("this.swapping")).toBool())
- + if (!element.scriptableProperty(QLatin1String("swapping")).toBool())
- continue;
- }
- diff --git a/src/webview.cpp b/src/webview.cpp
- index 525413a..86fadc8 100644
- --- a/src/webview.cpp
- +++ b/src/webview.cpp
- @@ -431,10 +431,10 @@ void WebView::addSearchEngine()
- QUrl searchUrl(page()->mainFrame()->baseUrl().resolved(QUrl(formElement.attribute(QLatin1String("action")))));
- QMap<QString, QString> searchEngines;
- QList<QWebElement> inputFields = formElement.findAll(QLatin1String("input"));
- - foreach (QWebElement inputField, inputFields) {
- + foreach (const QWebElement &inputField, inputFields) {
- QString type = inputField.attribute(QLatin1String("type"), QLatin1String("text"));
- QString name = inputField.attribute(QLatin1String("name"));
- - QString value = inputField.evaluateJavaScript(QLatin1String("this.value")).toString();
- + QString value = inputField.scriptableProperty(QLatin1String("value")).toString();
- if (type == QLatin1String("submit")) {
- searchEngines.insert(value, name);
- @@ -444,7 +444,7 @@ void WebView::addSearchEngine()
- searchUrl.addQueryItem(name, value);
- } else if (type == QLatin1String("checkbox") || type == QLatin1String("radio")) {
- - if (inputField.evaluateJavaScript(QLatin1String("this.checked")).toBool()) {
- + if (inputField.scriptableProperty(QLatin1String("checked")).toBool()) {
- searchUrl.addQueryItem(name, value);
- }
- } else if (type == QLatin1String("hidden")) {
- @@ -453,9 +453,9 @@ void WebView::addSearchEngine()
- }
- QList<QWebElement> selectFields = formElement.findAll(QLatin1String("select"));
- - foreach (QWebElement selectField, selectFields) {
- + foreach (const QWebElement &selectField, selectFields) {
- QString name = selectField.attribute(QLatin1String("name"));
- - int selectedIndex = selectField.evaluateJavaScript(QLatin1String("this.selectedIndex")).toInt();
- + int selectedIndex = selectField.scriptableProperty(QLatin1String("selectedIndex")).toInt();
- if (selectedIndex == -1)
- continue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement