Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation with QT 5.15 #37250

Merged
merged 9 commits into from
Jun 16, 2020
5 changes: 5 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ ENDIF((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_
IF((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18))
SET(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_core.pyi)
ENDIF((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18))

IF((${PYQT5_VERSION_STR} VERSION_EQUAL 5.15) OR (${PYQT5_VERSION_STR} VERSION_GREATER 5.15))
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} VECTOR_MAPPED_TYPE)
ENDIF((${PYQT5_VERSION_STR} VERSION_EQUAL 5.15) OR (${PYQT5_VERSION_STR} VERSION_GREATER 5.15))

GENERATE_SIP_PYTHON_MODULE_CODE(qgis._core core/core.sip "${sip_files_core}" cpp_files)
BUILD_SIP_PYTHON_MODULE(qgis._core core/core.sip ${cpp_files} "" qgis_core)
SET(SIP_CORE_CPP_FILES ${cpp_files})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ its ``value`` Type for additional information.
%End


private:
const QgsGeometryCheckError &operator=( const QgsGeometryCheckError & );
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ The underlying single error.
%End


private:
const QgsGeometryCheckErrorSingle &operator=( const QgsGeometryCheckErrorSingle & );
};

class QgsSingleGeometryCheck : QgsGeometryCheck
Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/effects/qgspainteffect.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ Sets the effect to be painted



private:
const QgsEffectPainter &operator=( const QgsEffectPainter & );
};


Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/qgsreadwritecontext.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ This would happen when it gets out of scope.
Creates a popper
%End
~QgsReadWriteContextCategoryPopper();
private:
QgsReadWriteContextCategoryPopper &operator=( const QgsReadWriteContextCategoryPopper & );
};

/************************************************************************
Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/qgsreadwritelocker.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Equivalent to doing ``changeMode( QgsReadWriteLocker.Unlock );``

~QgsReadWriteLocker();

private:
QgsReadWriteLocker &operator=( const QgsReadWriteLocker & );
};

/************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Constructor for RenderedFeatureContext.
%Docstring
The render context which was used while rendering feature.
%End

private:
RenderedFeatureContext &operator=( const RenderedFeatureContext & );
};

virtual void handleRenderedFeature( const QgsFeature &feature, const QgsGeometry &renderedBounds, const QgsRenderedFeatureHandlerInterface::RenderedFeatureContext &context ) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Feature to render
%End

QgsSymbol *symbol;

private:
RenderJob &operator=( const RenderJob & );
};

struct RenderLevel
Expand Down
2 changes: 2 additions & 0 deletions python/core/conversions.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,7 @@ template <TYPE>
%End
};

%If (VECTOR_MAPPED_TYPE)
template <TYPE>
%MappedType QVector< TYPE* >
{
Expand Down Expand Up @@ -1507,6 +1508,7 @@ template <TYPE>
return sipGetState(sipTransferObj);
%End
};
%End

%MappedType QMap<qint64, QgsFeature*>
{
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ done:
%Import QtWidgets/QtWidgetsmod.sip

%Feature ANDROID
%Feature VECTOR_MAPPED_TYPE

%Include conversions.sip
%Include qgsexception.sip
Expand Down
2 changes: 2 additions & 0 deletions python/server/auto_generated/qgsrequesthandler.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ Returns the requested format string
Returns ``True`` if the HTTP headers were already sent to the client
%End

private:
QgsRequestHandler &operator=( const QgsRequestHandler & );
};

/************************************************************************
Expand Down
5 changes: 5 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrycheckerror.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ class ANALYSIS_EXPORT QgsGeometryCheckError
Status mStatus;
QString mResolutionMessage;

private:

#ifdef SIP_RUN
const QgsGeometryCheckError &operator=( const QgsGeometryCheckError & );
#endif
};

Q_DECLARE_METATYPE( QgsGeometryCheckError * )
Expand Down
4 changes: 4 additions & 0 deletions src/analysis/vector/geometry_checker/qgssinglegeometrycheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ class ANALYSIS_EXPORT QgsGeometryCheckErrorSingle : public QgsGeometryCheckError
bool handleChanges( const QgsGeometryCheck::Changes &changes ) override SIP_SKIP;

private:
#ifdef SIP_RUN
const QgsGeometryCheckErrorSingle &operator=( const QgsGeometryCheckErrorSingle & );
#endif

QgsSingleGeometryCheckError *mError = nullptr;
};

Expand Down
4 changes: 4 additions & 0 deletions src/core/effects/qgspainteffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ class CORE_EXPORT QgsEffectPainter
///@endcond

private:
#ifdef SIP_RUN
const QgsEffectPainter &operator=( const QgsEffectPainter & );
#endif

QgsRenderContext &mRenderContext;
QPainter *mPainter = nullptr;
QgsPaintEffect *mEffect = nullptr;
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsreadwritecontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ class CORE_EXPORT QgsReadWriteContextCategoryPopper
QgsReadWriteContextCategoryPopper( QgsReadWriteContext &context ) : mContext( context ) {}
~QgsReadWriteContextCategoryPopper() {mContext.leaveCategory();}
private:
#ifdef SIP_RUN
QgsReadWriteContextCategoryPopper &operator=( const QgsReadWriteContextCategoryPopper & );
#endif

QgsReadWriteContext &mContext;
};

Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsreadwritelocker.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ class CORE_EXPORT QgsReadWriteLocker
~QgsReadWriteLocker();

private:
#ifdef SIP_RUN
QgsReadWriteLocker &operator=( const QgsReadWriteLocker & );
#endif

QReadWriteLock &mLock;
Mode mMode = Unlocked;
};
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsrenderedfeaturehandlerinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class CORE_EXPORT QgsRenderedFeatureHandlerInterface
* The render context which was used while rendering feature.
*/
const QgsRenderContext &renderContext;

private:
#ifdef SIP_RUN
RenderedFeatureContext &operator=( const RenderedFeatureContext & );
#endif
};

/**
Expand Down
7 changes: 6 additions & 1 deletion src/core/symbology/qgsrulebasedrenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@ class CORE_EXPORT QgsRuleBasedRenderer : public QgsFeatureRenderer
{
RenderJob( QgsRuleBasedRenderer::FeatureToRender &_ftr, QgsSymbol *_s )
: ftr( _ftr )
, symbol( _s )
, symbol( _s )
{}

//! Feature to render
QgsRuleBasedRenderer::FeatureToRender &ftr;

//! Symbol to render feature with (not owned by this object).
QgsSymbol *symbol = nullptr;

private:
#ifdef SIP_RUN
RenderJob &operator=( const RenderJob & );
#endif
};

/**
Expand Down
3 changes: 3 additions & 0 deletions src/server/qgsrequesthandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ class SERVER_EXPORT QgsRequestHandler
bool headersSent() const;

private:
#ifdef SIP_RUN
QgsRequestHandler &operator=( const QgsRequestHandler & );
#endif

void setupParameters();

Expand Down