4 changes: 0 additions & 4 deletions src/core/qgsnetworkaccessmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
//! destructor
~QgsNetworkAccessManager();

#if QT_VERSION >= 0x40500
//! insert a factory into the proxy factories list
void insertProxyFactory( QNetworkProxyFactory *factory );

Expand All @@ -64,7 +63,6 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager

//! retrieve proxy factory list
const QList<QNetworkProxyFactory *> proxyFactories() const;
#endif

//! retrieve fall back proxy (for urls that no factory returned proxies for)
const QNetworkProxy &fallbackProxy() const;
Expand Down Expand Up @@ -95,9 +93,7 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager

private:
QgsNetworkAccessManager( QObject *parent = 0 );
#if QT_VERSION >= 0x40500
QList<QNetworkProxyFactory*> mProxyFactories;
#endif
QNetworkProxy mFallbackProxy;
QStringList mExcludedURLs;

Expand Down
2 changes: 0 additions & 2 deletions src/core/qgspaintenginehack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ void QgsPaintEngineHack::fixFlags()
// | QPaintEngine::PerspectiveTransform
| QPaintEngine::BlendModes
// | QPaintEngine::ObjectBoundingModeGradients
#if QT_VERSION >= 0x040500
| QPaintEngine::RasterOpModes
#endif
| QPaintEngine::PaintOutsidePaintEvent
);
}
Expand Down
4 changes: 0 additions & 4 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,7 @@ void QgsGraduatedSymbolRendererV2::stopRender( QgsRenderContext& context )
it->symbol()->stopRender( context );

// cleanup mTempSymbols
#if QT_VERSION < 0x40600
QMap<QgsSymbolV2*, QgsSymbolV2*>::iterator it2 = mTempSymbols.begin();
#else
QHash<QgsSymbolV2*, QgsSymbolV2*>::iterator it2 = mTempSymbols.begin();
#endif
for ( ; it2 != mTempSymbols.end(); ++it2 )
{
it2.value()->stopRender( context );
Expand Down
4 changes: 0 additions & 4 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
int mRotationFieldIdx, mSizeScaleFieldIdx;

//! temporary symbols, used for data-defined rotation and scaling
#if QT_VERSION < 0x40600
QMap<QgsSymbolV2*, QgsSymbolV2*> mTempSymbols;
#else
QHash<QgsSymbolV2*, QgsSymbolV2*> mTempSymbols;
#endif

QgsSymbolV2* symbolForValue( double value );
};
Expand Down
4 changes: 0 additions & 4 deletions src/gui/qgscolorbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ void QgsColorButton::onButtonClicked()
{
//QgsDebugMsg( "entered" );
QColor newColor;
#if QT_VERSION >= 0x040500
QSettings settings;
if ( mAcceptLiveUpdates && settings.value( "/qgis/live_color_dialogs", false ).toBool() )
{
Expand All @@ -82,9 +81,6 @@ void QgsColorButton::onButtonClicked()
{
newColor = QColorDialog::getColor( color(), this->parentWidget(), mColorDialogTitle, mColorDialogOptions );
}
#else
newColor = QColorDialog::getColor( color(), this->parentWidget() );
#endif
setValidColor( newColor );

// reactivate button's window
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgsexpressionbuilderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
registerItem( specials[i]->group(), name, " " + name + " " );
}

#if QT_VERSION >= 0x040700
txtSearchEdit->setPlaceholderText( tr( "Search" ) );
#endif
}


Expand Down
4 changes: 0 additions & 4 deletions src/gui/qgsrelationadddlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ QgsRelationAddDlg::QgsRelationAddDlg( QWidget *parent ) :
{
setupUi( this );

#if QT_VERSION >= 0x40700
mTxtRelationId->setPlaceholderText( tr( "[Generated automatically]" ) );
#else
mTxtRelationId->setToolTip( tr( "[Generated automatically]" ) );
#endif
}

void QgsRelationAddDlg::addLayers( QList< QgsVectorLayer* > layers )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void QgsPointDisplacementRendererWidget::on_mLabelFontButton_clicked()
}

bool ok;
#if defined(Q_WS_MAC) && QT_VERSION >= 0x040500 && defined(QT_MAC_USE_COCOA)
#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for QT Carbon
QFont newFont = QFontDialog::getFont( &ok, mRenderer->labelFont(), 0, tr( "Label Font" ), QFontDialog::DontUseNativeDialog );
#else
Expand Down
6 changes: 0 additions & 6 deletions src/gui/symbology-ng/qgsstylev2managerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,8 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa
mSplitter->setSizes( QList<int>() << 170 << 540 );
mSplitter->restoreState( settings.value( "/Windows/StyleV2Manager/splitter" ).toByteArray() );

#if QT_VERSION >= 0x40500
tabItemType->setDocumentMode( true );
#endif
#if QT_VERSION >= 0x40700
searchBox->setPlaceholderText( tr( "Type here to filter symbols..." ) );
#else
searchBox->setToolTip( tr( "Type here to filter symbols..." ) );
#endif

// setup icons
btnAddItem->setIcon( QIcon( QgsApplication::iconPath( "symbologyAdd.png" ) ) );
Expand Down
20 changes: 0 additions & 20 deletions src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,19 +288,9 @@ void QgsVectorGradientColorRampV2Dialog::stopDoubleClicked( QTreeWidgetItem* ite
double key = item->data( 0, StopOffsetRole ).toDouble();
// allow for floating-point values
double val = key * 100;
#if QT_VERSION >= 0x40500
val = QInputDialog::getDouble( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
val, 0, 100, 2, &ok );
#else
QString res = QInputDialog::getText( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
QLineEdit::Normal, QString::number( val ), &ok );
if ( ok )
val = res.toDouble( &ok );
if ( ok )
ok = val >= 0 && val <= 100;
#endif
if ( !ok )
return;

Expand Down Expand Up @@ -330,19 +320,9 @@ void QgsVectorGradientColorRampV2Dialog::addStop()

bool ok;
double val = 50.0;
#if QT_VERSION >= 0x40500
val = QInputDialog::getDouble( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
val, 0, 100, 2, &ok );
#else
QString res = QInputDialog::getText( this, tr( "Offset of the stop" ),
tr( "Please enter offset in percents (%) of the new stop" ),
QLineEdit::Normal, QString::number( val ), &ok );
if ( ok )
val = res.toDouble( &ok );
if ( ok )
ok = val >= 0 && val <= 100;
#endif
if ( !ok )
return;
activateWindow();
Expand Down
3 changes: 0 additions & 3 deletions src/providers/wcs/qgswcscapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkProxy>

#if QT_VERSION >= 0x40500
#include <QNetworkDiskCache>
#endif

#include <QUrl>
#include <QIcon>
Expand Down
5 changes: 0 additions & 5 deletions src/providers/wcs/qgswcsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkProxy>

#if QT_VERSION >= 0x40500
#include <QNetworkDiskCache>
#endif

#include <QUrl>
#include <QRegExp>
Expand Down Expand Up @@ -1516,12 +1513,10 @@ QString QgsWcsProvider::metadata()
metadata += "</a>";

#if 0
#if QT_VERSION >= 0x40500
// TODO
metadata += "<a href=\"#cachestats\">";
metadata += tr( "Cache Stats" );
metadata += "</a> ";
#endif
#endif

metadata += "</td></tr>";
Expand Down
24 changes: 2 additions & 22 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,10 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkProxy>

#if QT_VERSION >= 0x40500
#include <QNetworkDiskCache>
#endif

#if QT_VERSION >= 0x40600
#include <QtXmlPatterns/QXmlSchema>
#include <QtXmlPatterns/QXmlSchemaValidator>
#endif

#include <QUrl>
#include <QIcon>
Expand Down Expand Up @@ -1160,14 +1155,14 @@ void QgsWmsProvider::tileReplyFinished()
{
QNetworkReply *reply = qobject_cast<QNetworkReply*>( sender() );

#if defined(QGISDEBUG) && (QT_VERSION >= 0x40500)
#if defined(QGISDEBUG)
bool fromCache = reply->attribute( QNetworkRequest::SourceIsFromCacheAttribute ).toBool();
if ( fromCache )
mCacheHits++;
else
mCacheMisses++;
#endif
#if defined(QGISDEBUG) && (QT_VERSION >= 0x40700)
#if defined(QGISDEBUG)
QgsDebugMsgLevel( "raw headers:", 3 );
foreach ( const QNetworkReply::RawHeaderPair &pair, reply->rawHeaderPairs() )
{
Expand Down Expand Up @@ -1206,22 +1201,13 @@ void QgsWmsProvider::tileReplyFinished()
#ifdef QGISDEBUG
int retry = reply->request().attribute( static_cast<QNetworkRequest::Attribute>( TileRetry ) ).toInt();

#if QT_VERSION >= 0x40500
QgsDebugMsg( QString( "tile reply %1 (%2) tile:%3(retry %4) rect:%5,%6 %7,%8) fromcache:%9 error:%10 url:%11" )
.arg( tileReqNo ).arg( mTileReqNo ).arg( tileNo ).arg( retry )
.arg( r.left(), 0, 'f' ).arg( r.bottom(), 0, 'f' ).arg( r.right(), 0, 'f' ).arg( r.top(), 0, 'f' )
.arg( fromCache )
.arg( reply->errorString() )
.arg( reply->url().toString() )
);
#else
QgsDebugMsg( QString( "tile reply %1 (%2) tile:%3(retry %4) rect:%5,%6 %7,%8) error:%9 url:%10" )
.arg( tileReqNo ).arg( mTileReqNo ).arg( tileNo ).arg( retry )
.arg( r.left(), 0, 'f' ).arg( r.bottom(), 0, 'f' ).arg( r.right(), 0, 'f' ).arg( r.top(), 0, 'f' )
.arg( reply->errorString() )
.arg( reply->url().toString() )
);
#endif
#endif

if ( reply->error() == QNetworkReply::NoError )
Expand Down Expand Up @@ -3729,11 +3715,9 @@ QString QgsWmsProvider::metadata()
metadata += tr( "Tile Layer Properties" );
metadata += "</a> ";

#if QT_VERSION >= 0x40500
metadata += "<a href=\"#cachestats\">";
metadata += tr( "Cache Stats" );
metadata += "</a> ";
#endif
}

metadata += "</td></tr>";
Expand Down Expand Up @@ -4044,7 +4028,6 @@ QString QgsWmsProvider::metadata()

metadata += "</table></td></tr>";

#if QT_VERSION >= 0x40500
if ( mTiled )
{
metadata += "<tr><th class=\"glossy\"><a name=\"cachestats\"></a>";
Expand Down Expand Up @@ -4082,7 +4065,6 @@ QString QgsWmsProvider::metadata()

metadata += "</table></td></tr>";
}
#endif
}

metadata += "</table>";
Expand Down Expand Up @@ -4400,7 +4382,6 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs

if ( xsdPart >= 0 ) // XSD available
{
#if QT_VERSION >= 0x40600
#if 0
// Validate GML by schema
// Loading schema takes ages! It needs to load all XSD referenced in the schema,
Expand Down Expand Up @@ -4430,7 +4411,6 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
results.insert( count, tr( "GML is not valid" ) );
continue;
}
#endif
#endif
QgsDebugMsg( "GML XSD (first 4000 bytes):\n" + QString::fromUtf8( mIdentifyResultBodies.value( xsdPart ).left( 4000 ) ) );
gmlSchema.parseXSD( mIdentifyResultBodies.value( xsdPart ) );
Expand Down