Changeset 405:58d36f9c7a39

Show
Ignore:
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:
1 modified

Legend:

Unmodified
Added
Removed
  • src/plugins/net/translaterequest.cpp

    r398 r405  
    143143        QString buf = http->readAll(); 
    144144 
    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() ); 
    147147        deleteLater(); 
    148148} 
     
    150150void TranslateRequest::httpRequestListFinished(int, bool err) 
    151151{ 
    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. 
    162153 
    163154        QStringList dlist;