Skip to content
Permalink
Browse files

Refine QgsFeatureRequest timeout api, dox

  • Loading branch information
nyalldawson committed Aug 6, 2018
1 parent d8b20e7 commit 70277635a2e39b16de4e82e6099c7845882a153e
@@ -637,7 +637,7 @@ Check if a feature is accepted by this requests filter

int connectionTimeout() const;
%Docstring
The timeout for how long we should wait for a connection if none is available from the pool
Returns the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
at this moment. A negative value (which is set by default) will wait forever.

.. note::
@@ -647,9 +647,9 @@ at this moment. A negative value (which is set by default) will wait forever.
.. versionadded:: 3.0
%End

void setConnectionTimeout( int connectionTimeout );
QgsFeatureRequest &setConnectionTimeout( int connectionTimeout );
%Docstring
The timeout for how long we should wait for a connection if none is available from the pool
Sets the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
at this moment. A negative value (which is set by default) will wait forever.

.. note::
@@ -673,7 +673,7 @@ expression function.
.. versionadded:: 3.4
%End

void setRequestMayBeNested( bool requestMayBeNested );
QgsFeatureRequest &setRequestMayBeNested( bool requestMayBeNested );
%Docstring
In case this request may be run nested within another already running
iteration on the same connection, set this to true.
@@ -294,19 +294,21 @@ int QgsFeatureRequest::connectionTimeout() const
return mConnectionTimeout;
}

void QgsFeatureRequest::setConnectionTimeout( int connectionTimeout )
QgsFeatureRequest &QgsFeatureRequest::setConnectionTimeout( int connectionTimeout )
{
mConnectionTimeout = connectionTimeout;
return *this;
}

bool QgsFeatureRequest::requestMayBeNested() const
{
return mRequestMayBeNested;
}

void QgsFeatureRequest::setRequestMayBeNested( bool requestMayBeNested )
QgsFeatureRequest &QgsFeatureRequest::setRequestMayBeNested( bool requestMayBeNested )
{
mRequestMayBeNested = requestMayBeNested;
return *this;
}


@@ -617,7 +617,7 @@ class CORE_EXPORT QgsFeatureRequest
bool acceptFeature( const QgsFeature &feature );

/**
* The timeout for how long we should wait for a connection if none is available from the pool
* Returns the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
* at this moment. A negative value (which is set by default) will wait forever.
*
* \note Only works if the provider supports this option.
@@ -627,14 +627,14 @@ class CORE_EXPORT QgsFeatureRequest
int connectionTimeout() const;

/**
* The timeout for how long we should wait for a connection if none is available from the pool
* Sets the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
* at this moment. A negative value (which is set by default) will wait forever.
*
* \note Only works if the provider supports this option.
*
* \since QGIS 3.0
*/
void setConnectionTimeout( int connectionTimeout );
QgsFeatureRequest &setConnectionTimeout( int connectionTimeout );

/**
* In case this request may be run nested within another already running
@@ -662,7 +662,7 @@ class CORE_EXPORT QgsFeatureRequest
*
* \since QGIS 3.4
*/
void setRequestMayBeNested( bool requestMayBeNested );
QgsFeatureRequest &setRequestMayBeNested( bool requestMayBeNested );

protected:
FilterType mFilter = FilterNone;

0 comments on commit 7027763

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