Skip to content

Commit f112350

Browse files
committed
make QgsTolerance a Q_GADGET
to use Q_ENUM
1 parent 2f385da commit f112350

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

python/core/core_auto.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
115115
%Include qgsstringstatisticalsummary.sip
116116
%Include qgsstringutils.sip
117117
%Include qgstextrenderer.sip
118-
%Include qgstolerance.sip
119118
%Include qgstracer.sip
120119
%Include qgsvectordataprovider.sip
121120
%Include qgsvectorlayercache.sip
@@ -342,6 +341,7 @@
342341
%Include qgsrunprocess.sip
343342
%Include qgssnappingconfig.sip
344343
%Include qgstaskmanager.sip
344+
%Include qgstolerance.sip
345345
%Include qgstrackedvectorlayertools.sip
346346
%Include qgstransaction.sip
347347
%Include qgstransactiongroup.sip

src/core/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ SET(QGIS_CORE_MOC_HDRS
622622
qgssnappingconfig.h
623623
qgssnappingutils.h
624624
qgstaskmanager.h
625+
qgstolerance.h
625626
qgstracer.h
626627
qgstrackedvectorlayertools.h
627628
qgstransaction.h
@@ -907,7 +908,6 @@ SET(QGIS_CORE_HDRS
907908
qgstextlabelfeature.h
908909
qgstextrenderer.h
909910
qgstextrenderer_p.h
910-
qgstolerance.h
911911
qgstracer.h
912912

913913
qgsvectordataprovider.h

src/core/qgstolerance.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class QgsPointXY;
2929
*/
3030
class CORE_EXPORT QgsTolerance
3131
{
32-
32+
Q_GADGET
3333
public:
3434

3535
/**
@@ -44,6 +44,7 @@ class CORE_EXPORT QgsTolerance
4444
//! Map (project) units. Added in 2.8
4545
ProjectUnits
4646
};
47+
Q_ENUM( UnitType );
4748

4849
/**
4950
* Static function to get vertex tolerance value.

0 commit comments

Comments
 (0)