File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
python/core/auto_generated Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ Constructs the labeling from given tree of rules (takes ownership)
269
269
~QgsRuleBasedLabeling();
270
270
271
271
QgsRuleBasedLabeling::Rule *rootRule();
272
+ const Rule *rootRule() const;
272
273
273
274
static QgsRuleBasedLabeling *create( const QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
274
275
%Docstring
Original file line number Diff line number Diff line change @@ -411,7 +411,16 @@ QgsRuleBasedLabeling *QgsRuleBasedLabeling::clone() const
411
411
412
412
QgsRuleBasedLabeling::~QgsRuleBasedLabeling ()
413
413
{
414
- delete mRootRule ;
414
+ }
415
+
416
+ QgsRuleBasedLabeling::Rule *QgsRuleBasedLabeling::rootRule ()
417
+ {
418
+ return mRootRule .get ();
419
+ }
420
+
421
+ const QgsRuleBasedLabeling::Rule *QgsRuleBasedLabeling::rootRule () const SIP_SKIP
422
+ {
423
+ return mRootRule .get ();
415
424
}
416
425
417
426
Original file line number Diff line number Diff line change @@ -346,8 +346,8 @@ class CORE_EXPORT QgsRuleBasedLabeling : public QgsAbstractVectorLayerLabeling
346
346
explicit QgsRuleBasedLabeling ( QgsRuleBasedLabeling::Rule *root SIP_TRANSFER );
347
347
~QgsRuleBasedLabeling () override ;
348
348
349
- QgsRuleBasedLabeling::Rule *rootRule () { return mRootRule ; }
350
- const Rule *rootRule () const SIP_SKIP { return mRootRule ; }
349
+ QgsRuleBasedLabeling::Rule *rootRule ();
350
+ const Rule *rootRule () const ;
351
351
352
352
// ! Create the instance from a DOM element with saved configuration
353
353
static QgsRuleBasedLabeling *create ( const QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
@@ -375,7 +375,7 @@ class CORE_EXPORT QgsRuleBasedLabeling : public QgsAbstractVectorLayerLabeling
375
375
void toSld ( QDomNode &parent, const QgsStringMap &props ) const override ;
376
376
377
377
protected:
378
- Rule * mRootRule = nullptr ;
378
+ std::unique_ptr< Rule> mRootRule ;
379
379
};
380
380
381
381
#ifndef SIP_RUN
You can’t perform that action at this time.
0 commit comments