Skip to content

Commit 4b1b4ab

Browse files
committedMar 13, 2020
Hide access to setRequestedTemporalRange from QgsRasterDataProviderTemporalCapabilities
Only QgsRasterLayerRenderer should be accessing this, so block access via friend class
1 parent 14355ba commit 4b1b4ab

File tree

2 files changed

+15
-26
lines changed

2 files changed

+15
-26
lines changed
 

‎python/core/auto_generated/raster/qgsrasterdataprovidertemporalcapabilities.sip.in

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,6 @@ Returns the available reference datetime range, which indicates the maximum
8484
extent of datetime values available for reference temporal ranges from the provider.
8585

8686
.. seealso:: :py:func:`setAvailableReferenceTemporalRange`
87-
%End
88-
89-
void setRequestedTemporalRange( const QgsDateTimeRange &range );
90-
%Docstring
91-
Sets the requested temporal ``range`` to retrieve when
92-
returning data from the associated data provider.
93-
94-
.. note::
95-
96-
this is not normally manually set, and is intended for use by
97-
QgsRasterLayerRenderer to automatically set the requested temporal range
98-
on a clone of the data provider during a render job.
99-
100-
.. seealso:: :py:func:`requestedTemporalRange`
10187
%End
10288

10389
const QgsDateTimeRange &requestedTemporalRange() const;

‎src/core/raster/qgsrasterdataprovidertemporalcapabilities.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,6 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
102102
*/
103103
const QgsDateTimeRange &availableReferenceTemporalRange() const;
104104

105-
/**
106-
* Sets the requested temporal \a range to retrieve when
107-
* returning data from the associated data provider.
108-
*
109-
* \note this is not normally manually set, and is intended for use by
110-
* QgsRasterLayerRenderer to automatically set the requested temporal range
111-
* on a clone of the data provider during a render job.
112-
*
113-
* \see requestedTemporalRange()
114-
*/
115-
void setRequestedTemporalRange( const QgsDateTimeRange &range );
116-
117105
/**
118106
* Returns the requested temporal range.
119107
* Intended to be used by the provider in fetching data.
@@ -176,6 +164,18 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
176164

177165
private:
178166

167+
/**
168+
* Sets the requested temporal \a range to retrieve when
169+
* returning data from the associated data provider.
170+
*
171+
* \note this is not normally manually set, and is intended for use by
172+
* QgsRasterLayerRenderer to automatically set the requested temporal range
173+
* on a clone of the data provider during a render job.
174+
*
175+
* \see requestedTemporalRange()
176+
*/
177+
void setRequestedTemporalRange( const QgsDateTimeRange &range );
178+
179179
/**
180180
* Represents available data provider datetime range.
181181
*
@@ -214,6 +214,9 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
214214
//! Interval handling method
215215
IntervalHandlingMethod mIntervalMatchMethod = MatchUsingWholeRange;
216216

217+
friend class QgsRasterLayerRenderer;
218+
friend class TestQgsRasterDataProviderTemporalCapabilities;
219+
217220
};
218221

219222
#endif // QGSRASTERDATAPROVIDERTEMPORALCAPABILITIES_H

0 commit comments

Comments
 (0)
Please sign in to comment.