Skip to content
Permalink
Browse files

Remove some more redundant qt version checks

  • Loading branch information
nyalldawson committed Dec 30, 2016
1 parent b72fb59 commit 2758f3bc2f78f9d2251c426cb134a859d5f84faa
@@ -97,14 +97,7 @@ eVisImageDisplayWidget::eVisImageDisplayWidget( QWidget* parent, Qt::WindowFlags

//setup http connection
mHttpBuffer = new QBuffer();
#if QT_VERSION < 0x050000
mHttpConnection = new QHttp();
#endif
mHttpBuffer->open( QBuffer::ReadWrite );
// TODO
#if QT_VERSION < 0x050000
connect( mHttpConnection, SIGNAL( requestFinished( int, bool ) ), this, SLOT( displayUrlImage( int, bool ) ) );
#endif

//initialize remaining variables
mScaleByHeight = false;
@@ -119,9 +112,6 @@ eVisImageDisplayWidget::~eVisImageDisplayWidget()
delete mImageLabel;
delete mImage;
delete mHttpBuffer;
#if QT_VERSION < 0x050000
delete mHttpConnection;
#endif
delete pbtnZoomIn;
delete pbtnZoomOut;
delete pbtnZoomFull;
@@ -199,11 +189,6 @@ void eVisImageDisplayWidget::displayImage()
void eVisImageDisplayWidget::displayUrlImage( const QString& url )
{
Q_UNUSED( url );
#if QT_VERSION < 0x050000
QUrl myUrl( url );
mHttpConnection->setHost( myUrl.host() );
mCurrentHttpImageRequestId = mHttpConnection->get( myUrl.path().replace( '\\', '/' ), mHttpBuffer );
#endif
}

/**
@@ -32,10 +32,6 @@
#include <QScrollArea>
#include <QPushButton>
#include <QBuffer>
// TODO: Update to QNetworkAccessManager
#if QT_VERSION < 0x050000
#include <QHttp>
#endif

#include <QResizeEvent>

@@ -94,12 +90,6 @@ class eVisImageDisplayWidget : public QWidget
//! \brief Pointer to the http buffer
QBuffer* mHttpBuffer;

// TODO: Update to QNetworkAccessManager
#if QT_VERSION < 0x050000
//! \brief Pointer to the http connection if needed
QHttp* mHttpConnection;
#endif

//! \brief This is a point to the actual image being displayed
QPixmap* mImage;

0 comments on commit 2758f3b

Please sign in to comment.
You can’t perform that action at this time.