Skip to content

Commit

Permalink
Rename layerRenderingTime()->perLayerRenderingTime()
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 4, 2017
1 parent 56508b5 commit 5ee9cdd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions python/core/qgsmaprendererjob.sip
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ List of errors that happened during the rendering job - available when the rende
int renderingTime() const;
%Docstring
Returns the total time it took to finish the job (in milliseconds).
.. seealso:: layerRenderingTime()
.. seealso:: perLayerRenderingTime()
:rtype: int
%End

QMap< QString, int > layerRenderingTime() const;
QMap< QString, int > perLayerRenderingTime() const;
%Docstring
Returns the render time (in ms) per layer, by layer ID.
.. versionadded:: 3.0
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprendererjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void QgsMapRendererJob::cleanupJobs( LayerRenderJobs &jobs )
}

if ( job.layer )
mLayerRenderingTime.insert( job.layer->id(), job.renderingTime );
mPerLayerRenderingTime.insert( job.layer->id(), job.renderingTime );
}

jobs.clear();
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmaprendererjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ class CORE_EXPORT QgsMapRendererJob : public QObject

/**
* Returns the total time it took to finish the job (in milliseconds).
* \see layerRenderingTime()
* \see perLayerRenderingTime()
*/
int renderingTime() const { return mRenderingTime; }

/**
* Returns the render time (in ms) per layer, by layer ID.
* \since QGIS 3.0
*/
QMap< QString, int > layerRenderingTime() const { return mLayerRenderingTime; }
QMap< QString, int > perLayerRenderingTime() const { return mPerLayerRenderingTime; }

/**
* Return map settings with which this job was started.
Expand Down Expand Up @@ -249,7 +249,7 @@ class CORE_EXPORT QgsMapRendererJob : public QObject
int mRenderingTime = 0;

//! Render time (in ms) per layer, by layer ID
QMap< QString, int > mLayerRenderingTime;
QMap< QString, int > mPerLayerRenderingTime;

/**
* Prepares the cache for storing the result of labeling. Returns false if
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void QgsMapCanvas::rendererJobFinished()

mMap->setContent( img, imageRect( img, mSettings ) );

mLastLayerRenderTime = mJob->layerRenderingTime();
mLastLayerRenderTime = mJob->perLayerRenderingTime();
if ( mUsePreviewJobs )
startPreviewJobs();
}
Expand Down

0 comments on commit 5ee9cdd

Please sign in to comment.