From d18a86bbc4ac63bcc2cf842f7e7c5df33d02ed89 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Wed, 9 Oct 2024 05:59:18 +0200 Subject: [PATCH] make QgsSettingsTree::treeRoot() available in Python bindings --- python/core/auto_generated/settings/qgssettingstree.sip.in | 5 +++++ src/core/settings/qgssettingstree.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python/core/auto_generated/settings/qgssettingstree.sip.in b/python/core/auto_generated/settings/qgssettingstree.sip.in index 7172171710f8..fabf66b1670e 100644 --- a/python/core/auto_generated/settings/qgssettingstree.sip.in +++ b/python/core/auto_generated/settings/qgssettingstree.sip.in @@ -23,6 +23,11 @@ class QgsSettingsTree %End public: + static QgsSettingsTreeNode *treeRoot(); +%Docstring +Returns the tree root node for the settings tree +%End + static const QgsSettingsTreeNode *node( const QString &key ); %Docstring diff --git a/src/core/settings/qgssettingstree.h b/src/core/settings/qgssettingstree.h index 1dc8ce95471f..c114f7b4cf61 100644 --- a/src/core/settings/qgssettingstree.h +++ b/src/core/settings/qgssettingstree.h @@ -32,13 +32,13 @@ class CORE_EXPORT QgsSettingsTree public: -#ifndef SIP_RUN - /** * Returns the tree root node for the settings tree */ static QgsSettingsTreeNode *treeRoot(); +#ifndef SIP_RUN + // only create first level here static inline QgsSettingsTreeNode *sTreeApp = treeRoot()->createChildNode( QStringLiteral( "app" ) ); static inline QgsSettingsTreeNode *sTreeConnections = treeRoot()->createChildNode( QStringLiteral( "connections" ) );