Skip to content

Commit

Permalink
Do not #include QtConcurrent when using map renderer jobs C++ API
Browse files Browse the repository at this point in the history
This way C++ apps using the API do not need to add QtConcurrent to their build
  • Loading branch information
wonder-sk committed Jun 8, 2017
1 parent 866bfc3 commit c340e37
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsmaprenderercustompainterjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "qgsrenderer.h"
#include "qgsmaplayerlistutils.h"

#include <QtConcurrentRun>

QgsMapRendererCustomPainterJob::QgsMapRendererCustomPainterJob( const QgsMapSettings &settings, QPainter *painter )
: QgsMapRendererJob( settings )
, mPainter( painter )
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsmaprendererjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "qgis_core.h"
#include "qgis_sip.h"
#include "qgis.h"
#include <QtConcurrentRun>
#include <QFutureWatcher>
#include <QImage>
#include <QPainter>
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsmaprendererparalleljob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "qgsmaplayerlistutils.h"

#include <QtConcurrentMap>
#include <QtConcurrentRun>

QgsMapRendererParallelJob::QgsMapRendererParallelJob( const QgsMapSettings &settings )
: QgsMapRendererQImageJob( settings )
Expand Down
3 changes: 1 addition & 2 deletions src/core/qgsmapsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ QgsMapSettings::QgsMapSettings()
, mMapUnitsPerPixel( 1 )
, mScale( 1 )
{
// set default map units - we use WGS 84 thus use degrees
mScaleCalculator.setMapUnits( QgsUnitTypes::DistanceDegrees );
mScaleCalculator.setMapUnits( QgsUnitTypes::DistanceUnknownUnit );

updateDerived();
}
Expand Down

0 comments on commit c340e37

Please sign in to comment.