mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Add a warning about the usage of setInstance
This commit is contained in:
parent
a782420153
commit
cbb0cb3f1c
@ -71,11 +71,15 @@ Returns the QgsProject singleton instance
|
||||
|
||||
static void setInstance( QgsProject *project );
|
||||
%Docstring
|
||||
Set the current project instance to ``project``
|
||||
Set the current project singleton instance to ``project``
|
||||
|
||||
.. note::
|
||||
|
||||
this is used mainly by the server, which caches the projects and (potentially) needs to switch the current instance on every request
|
||||
this method is provided mainly for the server, which caches the projects and (potentially) needs to switch the current instance on every request.
|
||||
|
||||
.. warning::
|
||||
|
||||
calling this method can have serious, unintended consequences, including instability, data loss and undefined behaviour. Use with EXTREME caution!
|
||||
|
||||
.. seealso:: :py:func:`instance`
|
||||
|
||||
|
@ -166,9 +166,10 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
static QgsProject *instance();
|
||||
|
||||
/**
|
||||
* Set the current project instance to \a project
|
||||
* Set the current project singleton instance to \a project
|
||||
*
|
||||
* \note this is used mainly by the server, which caches the projects and (potentially) needs to switch the current instance on every request
|
||||
* \note this method is provided mainly for the server, which caches the projects and (potentially) needs to switch the current instance on every request.
|
||||
* \warning calling this method can have serious, unintended consequences, including instability, data loss and undefined behaviour. Use with EXTREME caution!
|
||||
* \see instance()
|
||||
* \since QGIS 3.10.11
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user