Skip to content

Commit ae09135

Browse files
committed
Expand documentation for QgsAuxiliaryStorage constructors
1 parent 05eeb87 commit ae09135

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

python/core/qgsauxiliarystorage.sip

+20
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ class QgsAuxiliaryStorage
184184
%Docstring
185185
Constructor.
186186

187+
The project filename is used to build a database path at the same
188+
location, but with a different extension. Then, it's the same logic as
189+
.. seealso:: QgsAuxiliaryStorage(const QString &, bool copy).
190+
191+
187192
\param project The project for which the auxiliary storage has to be used
188193
\param copy Parameter indicating if a copy of the database has to be used
189194
%End
@@ -192,6 +197,21 @@ class QgsAuxiliaryStorage
192197
%Docstring
193198
Constructor.
194199

200+
If a valid database path is given in parameter and copy mode is
201+
deactivated, then every changes is directly committed on the original
202+
database. But if the copy mode is activated, then changes are committed
203+
on a copy of the database (a temporary file) and a save action is
204+
therefore necessary to keep modifications in the original file.
205+
206+
If an empty string for the database path is given in parameter, then
207+
a database is created in a temporary file whatever the copy mode.
208+
209+
If the database path given in parameter is not empty but does not exist,
210+
then a database is created at this location when copy mode is
211+
deactivated. When copy mode is activated, a temporary database is used
212+
instead and a save action will be necessary to create the database at
213+
the original location given in parameter.
214+
195215
\param filename The path of the database
196216
\param copy Parameter indicating if a copy of the database has to be used
197217
%End

src/core/qgsauxiliarystorage.h

+20
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ class CORE_EXPORT QgsAuxiliaryStorage
206206
/**
207207
* Constructor.
208208
*
209+
* The project filename is used to build a database path at the same
210+
* location, but with a different extension. Then, it's the same logic as
211+
* described for \see QgsAuxiliaryStorage(const QString &, bool copy).
212+
*
213+
*
209214
* \param project The project for which the auxiliary storage has to be used
210215
* \param copy Parameter indicating if a copy of the database has to be used
211216
*/
@@ -214,6 +219,21 @@ class CORE_EXPORT QgsAuxiliaryStorage
214219
/**
215220
* Constructor.
216221
*
222+
* If a valid database path is given in parameter and copy mode is
223+
* deactivated, then every changes is directly committed on the original
224+
* database. But if the copy mode is activated, then changes are committed
225+
* on a copy of the database (a temporary file) and a save action is
226+
* therefore necessary to keep modifications in the original file.
227+
*
228+
* If an empty string for the database path is given in parameter, then
229+
* a database is created in a temporary file whatever the copy mode.
230+
*
231+
* If the database path given in parameter is not empty but does not exist,
232+
* then a database is created at this location when copy mode is
233+
* deactivated. When copy mode is activated, a temporary database is used
234+
* instead and a save action will be necessary to create the database at
235+
* the original location given in parameter.
236+
*
217237
* \param filename The path of the database
218238
* \param copy Parameter indicating if a copy of the database has to be used
219239
*/

0 commit comments

Comments
 (0)