Permalink
Browse files

Conditionally compile QHttp code only in Qt4 build.

QHttp is gone in Qt5.
  • Loading branch information...
daniel-kristjansson authored and jyavenard committed Feb 26, 2013
1 parent 30f9b54 commit ce82052724bd74c60eb44116b4694ac263c44e0e
Showing with 9 additions and 1 deletion.
  1. +9 −1 mythtv/libs/libmythtv/recorders/cetonstreamhandler.cpp
@@ -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"
@@ -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);
@@ -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.