Skip to content

Commit

Permalink
Conditionally compile QHttp code only in Qt4 build.
Browse files Browse the repository at this point in the history
QHttp is gone in Qt5.
  • Loading branch information
daniel-kristjansson authored and jyavenard committed Mar 8, 2013
1 parent 30f9b54 commit ce82052
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mythtv/libs/libmythtv/recorders/cetonstreamhandler.cpp
Expand Up @@ -15,9 +15,12 @@

// Qt headers
#include <QCoreApplication>
#include <QHttp>
#include <QUrl>

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <QHttp>
#endif

// MythTV headers
#include "cetonstreamhandler.h"
#include "streamlisteners.h"
Expand Down Expand Up @@ -525,6 +528,7 @@ bool CetonStreamHandler::HttpRequest(
const QString &method, const QString &script, const QUrl &params,
QString &response, uint &status_code) const
{
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QHttp http;
http.setHost(_ip_address);

Expand Down Expand Up @@ -569,4 +573,8 @@ bool CetonStreamHandler::HttpRequest(
status_code = resp_header.statusCode();
response = QString(http.readAll());
return true;
#else
#warning CetonStreamHandler::HttpRequest() not yet ported to Qt5
return false;
#endif
}

0 comments on commit ce82052

Please sign in to comment.