Changeset 405:58d36f9c7a39
- Timestamp:
- 11/20/2009 12:51:02 PM (2 years ago)
- Author:
- Sidgyck <sidgyck@…>
- Branch:
- default
- Message:
-
[FIX]: !net translate gtr markup parsing fix.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r398
|
r405
|
|
| 143 | 143 | QString buf = http->readAll(); |
| 144 | 144 | |
| 145 | | plugin()->reply(stanza(), getValue(buf, "<div id=result_box dir=\"ltr\">(.*)</div>").trimmed() ); |
| 146 | | |
| | 145 | plugin()->reply(stanza(), getValue(buf, |
| | 146 | "onmouseout=\"this.style.backgroundColor='#fff'\">(.*)</span>").trimmed() ); |
| 147 | 147 | deleteLater(); |
| 148 | 148 | } |
| … |
… |
|
| 150 | 150 | void TranslateRequest::httpRequestListFinished(int, bool err) |
| 151 | 151 | { |
| 152 | | if (err || http->lastResponse().statusCode()!=200) |
| 153 | | { |
| 154 | | plugin()->reply(stanza(),"Failed to translate: "+http->lastResponse().reasonPhrase()); |
| 155 | | deleteLater(); |
| 156 | | return; |
| 157 | | } |
| 158 | | QString buf = http->readAll(); |
| 159 | | |
| 160 | | QRegExp exp("<select name=sl id=old_sl tabindex=0>(.*)</select>"); |
| 161 | | exp.setMinimal(TRUE); |
| | 152 | ///FIXIT: implement fetch list from the web. |
| 162 | 153 | |
| 163 | 154 | QStringList dlist; |