diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2009-09-28 14:12:40 (GMT) |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2009-09-28 14:12:40 (GMT) |
commit | bce856612cfdd41915c4e8702be78833b3a94e33 (patch) | |
tree | 4e7171836f64ebeeee8a71ee483df6ad342f0fa0 /examples | |
parent | afa49a5f3fac7233362512dd3b1e5fdd45b99404 (diff) | |
download | Qt-bce856612cfdd41915c4e8702be78833b3a94e33.zip Qt-bce856612cfdd41915c4e8702be78833b3a94e33.tar.gz Qt-bce856612cfdd41915c4e8702be78833b3a94e33.tar.bz2 |
Correct the formextractor which was using removed QWebElement API
Reviewed-by: Kent Hansen
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webkit/formextractor/formextractor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/webkit/formextractor/formextractor.cpp b/examples/webkit/formextractor/formextractor.cpp index 10bd9af..4b181e8 100644 --- a/examples/webkit/formextractor/formextractor.cpp +++ b/examples/webkit/formextractor/formextractor.cpp @@ -67,15 +67,15 @@ void FormExtractor::submit() QWebElement femaleGender = frame->findFirstElement("#genderFemale"); QWebElement updates = frame->findFirstElement("#updates"); - ui.firstNameEdit->setText(firstName.scriptableProperty("value").toString()); - ui.lastNameEdit->setText(lastName.scriptableProperty("value").toString()); + ui.firstNameEdit->setText(firstName.evaluateJavaScript("this.value").toString()); + ui.lastNameEdit->setText(lastName.evaluateJavaScript("this.value").toString()); - if (maleGender.scriptableProperty("checked").toBool()) - ui.genderEdit->setText(maleGender.scriptableProperty("value").toString()); - else if (femaleGender.scriptableProperty("checked").toBool()) - ui.genderEdit->setText(femaleGender.scriptableProperty("value").toString()); + if (maleGender.evaluateJavaScript("this.checked").toBool()) + ui.genderEdit->setText(maleGender.evaluateJavaScript("this.value").toString()); + else if (femaleGender.evaluateJavaScript("this.checked").toBool()) + ui.genderEdit->setText(femaleGender.evaluateJavaScript("this.value").toString()); - if (updates.scriptableProperty("checked").toBool()) + if (updates.evaluateJavaScript("this.checked").toBool()) ui.updatesEdit->setText("Yes"); else ui.updatesEdit->setText("No"); |