/[projects]/infoscreen/httpwrapper.cpp
ViewVC logotype

Contents of /infoscreen/httpwrapper.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2103 - (show annotations) (download)
Tue Feb 4 14:16:40 2014 UTC (10 years, 3 months ago) by torben
File size: 443 byte(s)
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