diff --git a/python/gui/auto_generated/qgisinterface.sip.in b/python/gui/auto_generated/qgisinterface.sip.in index 2367ef63939..a62060f9382 100644 --- a/python/gui/auto_generated/qgisinterface.sip.in +++ b/python/gui/auto_generated/qgisinterface.sip.in @@ -840,6 +840,13 @@ Returns the insertion point. This represents the current layer tree group and index where newly added map layers should be inserted into. .. versionadded:: 3.10 +%End + + virtual QgsUserProfileManager *userProfileManager() = 0; +%Docstring +Returns a reference to the user profile manager + +.. versionadded:: 3.30 %End public slots: // TODO: do these functions really need to be slots? diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index bf8730d2c5f..d8ad81ff2a7 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -903,3 +903,8 @@ QList QgisAppInterface::activeDecorations() return qgis->activeDecorations(); } +QgsUserProfileManager *QgisAppInterface::userProfileManager() +{ + return qgis->userProfileManager(); +} + diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index 85fcc4f96e7..b8f3eaaa482 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -308,6 +308,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() override; void setGpsPanelConnection( QgsGpsConnection *connection ) override; QList activeDecorations() override; + QgsUserProfileManager *userProfileManager() override; private slots: diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 44eb8c0f5f2..fec21ba1576 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -70,6 +70,7 @@ class QgsDevToolWidgetFactory; class QgsGpsConnection; class QgsApplicationExitBlockerInterface; class QgsAbstractMapToolHandler; +class QgsUserProfileManager; /** * \ingroup gui @@ -743,6 +744,12 @@ class GUI_EXPORT QgisInterface : public QObject */ virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0; + /** + * Returns a reference to the user profile manager + * \since QGIS 3.30 + */ + virtual QgsUserProfileManager *userProfileManager() = 0; + public slots: // TODO: do these functions really need to be slots? /* Exposed functions */