Skip to content

Commit

Permalink
Make some more warnings non fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 16, 2022
1 parent 2d4f50d commit c61a9fa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/core/providers/copc/qgscopcprovider.cpp
Expand Up @@ -107,7 +107,8 @@ QString QgsCopcProvider::description() const

QgsPointCloudIndex *QgsCopcProvider::index() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- 2d rendering of point clouds is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mIndex.get();
}
Expand Down
18 changes: 12 additions & 6 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -363,7 +363,8 @@ void QgsMapLayer::setBlendMode( const QPainter::CompositionMode blendMode )

QPainter::CompositionMode QgsMapLayer::blendMode() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mBlendMode;
}
Expand All @@ -381,7 +382,8 @@ void QgsMapLayer::setOpacity( double opacity )

double QgsMapLayer::opacity() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mLayerOpacity;
}
Expand Down Expand Up @@ -926,7 +928,8 @@ void QgsMapLayer::connectNotify( const char *signal )

bool QgsMapLayer::isInScaleRange( double scale ) const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return !mScaleBasedVisibility ||
( ( mMinScale == 0 || mMinScale * Qgis::SCALE_PRECISION < scale )
Expand All @@ -935,7 +938,8 @@ bool QgsMapLayer::isInScaleRange( double scale ) const

bool QgsMapLayer::hasScaleBasedVisibility() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mScaleBasedVisibility;
}
Expand Down Expand Up @@ -1055,7 +1059,8 @@ bool QgsMapLayer::supportsEditing() const

QgsCoordinateReferenceSystem QgsMapLayer::crs() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mCRS;
}
Expand Down Expand Up @@ -2203,7 +2208,8 @@ const QgsObjectCustomProperties &QgsMapLayer::customProperties() const

QVariant QgsMapLayer::customProperty( const QString &value, const QVariant &defaultValue ) const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mCustomProperties.value( value, defaultValue );
}
Expand Down
6 changes: 4 additions & 2 deletions src/core/vector/qgsvectordataprovider.cpp
Expand Up @@ -575,7 +575,8 @@ QStringList QgsVectorDataProvider::uniqueStringsMatching( int index, const QStri
QVariant QgsVectorDataProvider::aggregate( QgsAggregateCalculator::Aggregate aggregate, int index,
const QgsAggregateCalculator::AggregateParameters &parameters, QgsExpressionContext *context, bool &ok, QgsFeatureIds *fids ) const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "aggregate" functions are not thread safe and call this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

//base implementation does nothing
Q_UNUSED( aggregate )
Expand Down Expand Up @@ -1003,7 +1004,8 @@ void QgsVectorDataProvider::setNativeTypes( const QList<NativeType> &nativeTypes

QTextCodec *QgsVectorDataProvider::textEncoding() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
// non fatal for now -- the "rasterize" processing algorithm is not thread safe and calls this
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL

return mEncoding;
}
Expand Down

0 comments on commit c61a9fa

Please sign in to comment.