Parent Directory | Revision Log
make code compile with current QT
1 | #include "httpwrapper.h" |
2 | |
3 | #include <QHttp> |
4 | #include <QApplication> |
5 | #include <QUrl> |
6 | |
7 | #include <unistd.h> |
8 | |
9 | |
10 | HttpWrapper::HttpWrapper() |
11 | { |
12 | } |
13 | |
14 | QByteArray HttpWrapper::getSyncData(QString& uri) |
15 | { |
16 | QHttp http; |
17 | QUrl url(uri); |
18 | http.setHost(url.host() ); |
19 | http.get(url.path() + "?" + url.encodedQuery(), 0); |
20 | |
21 | while (http.currentId() != 0 ) |
22 | { |
23 | qApp->processEvents(); |
24 | usleep(1000); |
25 | } |
26 | |
27 | return http.readAll(); |
28 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |