[Qt-jambi-interest] Problem with QHttp Example

Eskil Abrahamsen Blomfeldt eblomfel at trolltech.com
Tue Jul 15 13:51:07 CEST 2008


Pablo Terradillos wrote:
>     QHttp http = new QHttp();
>     QHttpRequestHeader header = new QHttpRequestHeader("GET", "/index.html");
>     header.setValue("Host", "www.trolltech.com");
>     http.setHost("www.trolltech.com", 80);
>     http.request(header);
>
>
> But Eclipse complains about setValue, setHost and request's methods... 
> "Misplaced construct" and "Invalid token".
>   
Hi, Pablo.

Could it be that you are compiling with the wrong compiler version? This 
can be set on a per-project basis and needs to be 1.5 or higher. I don't 
know why it would lead to the error messages you are getting, though.

Otherwise, you might have more luck asking on an Eclipse forum, because 
there is nothing wrong with your code at least. I just tried it, and 
with the regular javac it compiles just fine.

-- Eskil





More information about the Qt-jambi-interest mailing list