Skip to content

Commit 5267677

Browse files
committedMay 11, 2017
Sipify QgsTask[Manager]
1 parent 3e88e8e commit 5267677

File tree

3 files changed

+337
-230
lines changed

3 files changed

+337
-230
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ core/qgssnappingutils.sip
7272
core/qgsspatialindex.sip
7373
core/qgssqlstatement.sip
7474
core/qgsstringutils.sip
75-
core/qgstaskmanager.sip
7675
core/qgstolerance.sip
7776
core/qgstracer.sip
7877
core/qgstrackedvectorlayertools.sip

‎python/core/qgstaskmanager.sip

Lines changed: 336 additions & 228 deletions
Original file line numberDiff line numberDiff line change
@@ -1,358 +1,466 @@
1-
/**
2-
* \ingroup core
3-
* \class QgsTask
4-
* \brief Abstract base class for long running background tasks. Tasks can be controlled directly,
5-
* or added to a QgsTaskManager for automatic management.
6-
*
7-
* Derived classes should implement the process they want to execute in the background
8-
* within the run() method. This method will be called when the
9-
* task commences (ie via calling start() ).
10-
*
11-
* Long running tasks should periodically check the isCanceled() flag to detect if the task
12-
* has been canceled via some external event. If this flag is true then the task should
13-
* clean up and terminate at the earliest possible convenience.
14-
*
15-
* \note Added in version 3.0
16-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/qgstaskmanager.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
13+
14+
typedef QList< QgsTask * > QgsTaskList;
15+
1716
class QgsTask : QObject
1817
{
18+
%Docstring
19+
Abstract base class for long running background tasks. Tasks can be controlled directly,
20+
or added to a QgsTaskManager for automatic management.
21+
22+
Derived classes should implement the process they want to execute in the background
23+
within the run() method. This method will be called when the
24+
task commences (ie via calling run() ).
25+
26+
Long running tasks should periodically check the isCanceled() flag to detect if the task
27+
has been canceled via some external event. If this flag is true then the task should
28+
clean up and terminate at the earliest possible convenience.
29+
30+
.. versionadded:: 3.0
31+
%End
1932

2033
%TypeHeaderCode
21-
#include <qgstaskmanager.h>
34+
#include "qgstaskmanager.h"
2235
%End
2336
public:
2437

25-
//! Status of tasks
2638
enum TaskStatus
2739
{
28-
Queued, /*!< Task is queued and has not begun */
29-
OnHold, /*!< Task is queued but on hold and will not be started */
30-
Running, /*!< Task is currently running */
31-
Complete, /*!< Task successfully completed */
32-
Terminated, /*!< Task was terminated or errored */
40+
Queued,
41+
OnHold,
42+
Running,
43+
Complete,
44+
Terminated,
3345
};
3446

35-
//! Task flags
3647
enum Flag
3748
{
38-
CanCancel, //!< Task can be canceled
39-
AllFlags, //!< Task supports all flags
49+
CanCancel,
50+
AllFlags,
4051
};
4152
typedef QFlags<QgsTask::Flag> Flags;
4253

43-
/**
44-
* Constructor for QgsTask.
45-
* @param description text description of task
46-
* @param flags task flags
47-
*/
54+
4855
QgsTask( const QString &description = QString(), const Flags &flags = AllFlags );
56+
%Docstring
57+
Constructor for QgsTask.
58+
\param description text description of task
59+
\param flags task flags
60+
%End
61+
62+
~QgsTask();
4963

50-
/**
51-
* Returns the flags associated with the task.
52-
*/
5364
Flags flags() const;
65+
%Docstring
66+
Returns the flags associated with the task.
67+
:rtype: Flags
68+
%End
5469

55-
/**
56-
* Returns true if the task can be canceled.
57-
*/
5870
bool canCancel() const;
71+
%Docstring
72+
Returns true if the task can be canceled.
73+
:rtype: bool
74+
%End
5975

60-
/**
61-
* Returns true if the task is active, ie it is not complete and has
62-
* not been canceled.
63-
*/
6476
bool isActive() const;
77+
%Docstring
78+
Returns true if the task is active, ie it is not complete and has
79+
not been canceled.
80+
:rtype: bool
81+
%End
6582

66-
/**
67-
* Returns the current task status.
68-
*/
6983
TaskStatus status() const;
84+
%Docstring
85+
Returns the current task status.
86+
:rtype: TaskStatus
87+
%End
7088

71-
/**
72-
* Returns the task's description.
73-
*/
7489
QString description() const;
90+
%Docstring
91+
Returns the task's description.
92+
:rtype: str
93+
%End
7594

76-
/**
77-
* Returns the task's progress (between 0.0 and 100.0)
78-
*/
7995
double progress() const;
96+
%Docstring
97+
Returns the task's progress (between 0.0 and 100.0)
98+
:rtype: float
99+
%End
80100

81101
virtual void cancel();
102+
%Docstring
103+
Notifies the task that it should terminate. Calling this is not guaranteed
104+
to immediately end the task, rather it sets the isCanceled() flag which
105+
task subclasses can check and terminate their operations at an appropriate
106+
time. Any subtasks owned by this task will also be canceled.
107+
Derived classes must ensure that the base class implementation is called
108+
from any overridden version.
109+
.. seealso:: isCanceled()
110+
%End
82111

83-
/**
84-
* Places the task on hold. If the task in not queued
85-
* (ie it is already running or has finished) then calling this has no effect.
86-
* Calling this method only has an effect for tasks which are managed
87-
* by a QgsTaskManager.
88-
* @see unhold()
89-
*/
90112
void hold();
113+
%Docstring
114+
Places the task on hold. If the task in not queued
115+
(ie it is already running or has finished) then calling this has no effect.
116+
Calling this method only has an effect for tasks which are managed
117+
by a QgsTaskManager.
118+
.. seealso:: unhold()
119+
%End
91120

92-
/**
93-
* Releases the task from being held. For tasks managed by a QgsTaskManager
94-
* calling this will re-add them to the queue. If the
95-
* task in not currently being held then calling this has no effect.
96-
* @see hold()
97-
*/
98121
void unhold();
122+
%Docstring
123+
Releases the task from being held. For tasks managed by a QgsTaskManager
124+
calling this will re-add them to the queue. If the
125+
task in not currently being held then calling this has no effect.
126+
.. seealso:: hold()
127+
%End
99128

100-
//! Controls how subtasks relate to their parent task
101129
enum SubTaskDependency
102130
{
103-
SubTaskIndependent, //!< Subtask is independent of the parent, and can run before, after or at the same time as the parent.
104-
ParentDependsOnSubTask, //!< Subtask must complete before parent can begin
131+
SubTaskIndependent,
132+
ParentDependsOnSubTask,
105133
};
106134

107-
/**
108-
* Adds a subtask to this task.
109-
*
110-
* Subtasks allow a single task to be created which
111-
* consists of multiple smaller tasks. Subtasks are not visible or indepedently
112-
* controllable by users. Ownership of the subtask is transferred.
113-
* Subtasks can have an optional list of dependent tasks, which must be completed
114-
* before the subtask can begin. By default subtasks are considered independent
115-
* of the parent task, ie they can be run either before, after, or at the same
116-
* time as the parent task. This behavior can be overridden through the subTaskDependency
117-
* argument.
118-
*
119-
* The parent task must be added to a QgsTaskManager for subtasks to be utilized.
120-
* Subtasks should not be added manually to a QgsTaskManager, rather, only the parent
121-
* task should be added to the manager.
122-
*
123-
* Subtasks can be nested, ie a subtask can legally be a parent task itself with
124-
* its own set of subtasks.
125-
*/
126-
void addSubTask( QgsTask* subTask /Transfer/, const QgsTaskList& dependencies = QgsTaskList(),
135+
void addSubTask( QgsTask *subTask /Transfer/, const QgsTaskList &dependencies = QgsTaskList(),
127136
SubTaskDependency subTaskDependency = SubTaskIndependent );
137+
%Docstring
138+
Adds a subtask to this task.
139+
140+
Subtasks allow a single task to be created which
141+
consists of multiple smaller tasks. Subtasks are not visible or indepedently
142+
controllable by users. Ownership of the subtask is transferred.
143+
Subtasks can have an optional list of dependent tasks, which must be completed
144+
before the subtask can begin. By default subtasks are considered independent
145+
of the parent task, ie they can be run either before, after, or at the same
146+
time as the parent task. This behavior can be overridden through the subTaskDependency
147+
argument. Note that subtasks should NEVER be dependent on their parent task, and violating
148+
this constraint will prevent the task from completing successfully.
149+
150+
The parent task must be added to a QgsTaskManager for subtasks to be utilized.
151+
Subtasks should not be added manually to a QgsTaskManager, rather, only the parent
152+
task should be added to the manager.
153+
154+
Subtasks can be nested, ie a subtask can legally be a parent task itself with
155+
its own set of subtasks.
156+
%End
157+
158+
void setDependentLayers( const QList<QgsMapLayer *> &dependentLayers );
159+
%Docstring
160+
Sets a list of layers on which the task depends. The task will automatically
161+
be canceled if any of these layers are about to be removed.
162+
.. seealso:: dependentLayerIds()
163+
%End
164+
165+
QList< QgsMapLayer * > dependentLayers() const;
166+
%Docstring
167+
Returns the list of layers on which the task depends. The task will automatically
168+
be canceled if any of these layers are about to be removed.
169+
.. seealso:: setDependentLayers()
170+
:rtype: list of QgsMapLayer
171+
%End
128172

129-
void setDependentLayers( const QList<QgsMapLayer*> &dependentLayers );
173+
bool waitForFinished( int timeout = 30000 );
174+
%Docstring
175+
Blocks the current thread until the task finishes or a maximum of ``timeout`` milliseconds.
176+
If the ``timeout`` is ``-1`` the thread will be blocked forever.
130177

131-
QList< QgsMapLayer* > dependentLayers() const;
178+
The result will be false if the wait timed out and true in any other case.
179+
:rtype: bool
180+
%End
132181

133182
signals:
134183

135-
/**
136-
* Will be emitted by task when its progress changes.
137-
* @param progress percent of progress, from 0.0 - 100.0
138-
* @note derived classes should not emit this signal directly, instead they should call
139-
* setProgress()
140-
*/
141184
void progressChanged( double progress );
185+
%Docstring
186+
Will be emitted by task when its progress changes.
187+
\param progress percent of progress, from 0.0 - 100.0
188+
.. note::
189+
190+
derived classes should not emit this signal directly, instead they should call
191+
setProgress()
192+
%End
142193

143-
/**
144-
* Will be emitted by task when its status changes.
145-
* @param status new task status
146-
* @note derived classes should not emit this signal directly, it will automatically
147-
* be emitted
148-
*/
149194
void statusChanged( int status );
195+
%Docstring
196+
Will be emitted by task when its status changes.
197+
\param status new task status
198+
.. note::
199+
200+
derived classes should not emit this signal directly, it will automatically
201+
be emitted
202+
%End
150203

151-
/**
152-
* Will be emitted by task to indicate its commencement.
153-
* @note derived classes should not emit this signal directly, it will automatically
154-
* be emitted when the task begins
155-
*/
156204
void begun();
205+
%Docstring
206+
Will be emitted by task to indicate its commencement.
207+
.. note::
208+
209+
derived classes should not emit this signal directly, it will automatically
210+
be emitted when the task begins
211+
%End
157212

158-
/**
159-
* Will be emitted by task to indicate its successful completion.
160-
* @note derived classes should not emit this signal directly, it will automatically
161-
* be emitted
162-
*/
163213
void taskCompleted();
214+
%Docstring
215+
Will be emitted by task to indicate its successful completion.
216+
.. note::
217+
218+
derived classes should not emit this signal directly, it will automatically
219+
be emitted
220+
%End
164221

165-
/**
166-
* Will be emitted by task if it has terminated for any reason
167-
* other then completion (e.g., when a task has been canceled or encountered
168-
* an internal error).
169-
* @note derived classes should not emit this signal directly, it will automatically
170-
* be emitted
171-
*/
172222
void taskTerminated();
223+
%Docstring
224+
Will be emitted by task if it has terminated for any reason
225+
other then completion (e.g., when a task has been canceled or encountered
226+
an internal error).
227+
.. note::
228+
229+
derived classes should not emit this signal directly, it will automatically
230+
be emitted
231+
%End
173232

174233
protected:
175234

176-
/**
177-
* Performs the task's operation. This method will be called when the task commences
178-
* (ie via calling start() ), and subclasses should implement the operation they
179-
* wish to perform in the background within this method.
180-
*
181-
* A task must return a boolean value to indicate whether the
182-
* task was completed successfully or terminated before completion.
183-
*/
184235
virtual bool run() = 0;
236+
%Docstring
237+
Performs the task's operation. This method will be called when the task commences
238+
(ie via calling start() ), and subclasses should implement the operation they
239+
wish to perform in the background within this method.
240+
241+
A task must return a boolean value to indicate whether the
242+
task was completed successfully or terminated before completion.
243+
:rtype: bool
244+
%End
185245

186-
/**
187-
* If the task is managed by a QgsTaskManager, this will be called after the
188-
* task has finished (whether through successful completion or via early
189-
* termination). The result argument reflects whether
190-
* the task was successfully completed or not. This method is always called
191-
* from the main thread, so it is safe to create widgets and perform other
192-
* operations which require the main thread. However, the GUI will be blocked
193-
* for the duration of this method so tasks should avoid performing any
194-
* lengthy operations here.
195-
*/
196246
virtual void finished( bool result );
247+
%Docstring
248+
If the task is managed by a QgsTaskManager, this will be called after the
249+
task has finished (whether through successful completion or via early
250+
termination). The result argument reflects whether
251+
the task was successfully completed or not. This method is always called
252+
from the main thread, so it is safe to create widgets and perform other
253+
operations which require the main thread. However, the GUI will be blocked
254+
for the duration of this method so tasks should avoid performing any
255+
lengthy operations here.
256+
%End
197257

198-
/**
199-
* Will return true if task should terminate ASAP. If the task reports the CanCancel
200-
* flag, then derived classes' run() methods should periodically check this and
201-
* terminate in a safe manner.
202-
*/
203258
bool isCanceled() const;
259+
%Docstring
260+
Will return true if task should terminate ASAP. If the task reports the CanCancel
261+
flag, then derived classes' run() methods should periodically check this and
262+
terminate in a safe manner.
263+
:rtype: bool
264+
%End
204265

205266
protected slots:
206267

207-
/**
208-
* Sets the task's current progress. If task reports the CanReportProgress flag then
209-
* the derived class should call this method whenever the task wants to update its
210-
* progress. Calling will automatically emit the progressChanged signal.
211-
* @param progress percent of progress, from 0.0 - 100.0
212-
*/
213268
void setProgress( double progress );
269+
%Docstring
270+
Sets the task's current progress. The derived class should call this method whenever
271+
the task wants to update its progress. Calling will automatically emit the progressChanged signal.
272+
\param progress percent of progress, from 0.0 - 100.0
273+
%End
214274

215275
};
216276

277+
217278
QFlags<QgsTask::Flag> operator|(QgsTask::Flag f1, QFlags<QgsTask::Flag> f2);
218279

219-
//! List of QgsTask objects
220-
typedef QList< QgsTask* > QgsTaskList;
221280

222-
/** \ingroup core
223-
* \class QgsTaskManager
224-
* \brief Task manager for managing a set of long-running QgsTask tasks. This class can be created directly,
225-
* or accessed via a global instance.
226-
* \note Added in version 2.16
227-
*/
228281
class QgsTaskManager : QObject
229282
{
283+
%Docstring
284+
Task manager for managing a set of long-running QgsTask tasks. This class can be created directly,
285+
or accessed via QgsApplication.taskManager().
286+
.. versionadded:: 3.0
287+
%End
288+
230289
%TypeHeaderCode
231-
#include <qgstaskmanager.h>
290+
#include "qgstaskmanager.h"
232291
%End
233292
public:
234293

235-
/** Constructor for QgsTaskManager.
236-
* @param parent parent QObject
237-
*/
238294
QgsTaskManager( QObject *parent /TransferThis/ = 0 );
295+
%Docstring
296+
Constructor for QgsTaskManager.
297+
\param parent parent QObject
298+
%End
239299

240300
virtual ~QgsTaskManager();
241301

242-
/**
243-
* Definition of a task for inclusion within a task bundle.
244-
*/
245302
struct TaskDefinition
246303
{
247-
/**
248-
* Constructor for TaskDefinition. Ownership of the task is transferred to the definition.
249-
*/
304+
250305
explicit TaskDefinition( QgsTask *task, QgsTaskList dependentTasks = QgsTaskList() );
306+
%Docstring
307+
Constructor for TaskDefinition. Ownership of the task is not transferred to the definition,
308+
but will be transferred to a QgsTaskManager.
309+
%End
251310

252-
//! Task
253311
QgsTask *task;
312+
%Docstring
313+
Task
314+
%End
254315

255-
/**
256-
* List of dependencies which must be completed before task can run. If any dependent tasks are
257-
* canceled this task will also be canceled. Dependent tasks must also be added
258-
* to the task manager for proper handling of dependencies.
259-
*/
260316
QgsTaskList dependentTasks;
317+
%Docstring
318+
List of dependent tasks which must be completed before task can run. If any dependent tasks are
319+
canceled this task will also be canceled. Dependent tasks must also be added
320+
to the task manager for proper handling of dependencies.
321+
%End
322+
261323
};
262324

263-
/** Adds a task to the manager. Ownership of the task is transferred
264-
* to the manager, and the task manager will be responsible for starting
265-
* the task. The priority argument can be used to control the run queue's
266-
* order of execution.
267-
* @returns unique task ID
268-
*/
269325
long addTask( QgsTask *task /Transfer/, int priority = 0 );
326+
%Docstring
327+
Adds a task to the manager. Ownership of the task is transferred
328+
to the manager, and the task manager will be responsible for starting
329+
the task. The priority argument can be used to control the run queue's
330+
order of execution, with larger numbers
331+
taking precedence over lower priority numbers.
332+
:return: unique task ID
333+
:rtype: long
334+
%End
270335

271-
/**
272-
* Adds a task to the manager, using a full task definition (including dependency
273-
* handling). Ownership of the task is transferred to the manager, and the task
274-
* manager will be responsible for starting the task. The priority argument can
275-
* be used to control the run queue's order of execution.
276-
* @returns unique task ID
277-
*/
278336
long addTask( const TaskDefinition &task /Transfer/, int priority = 0 );
337+
%Docstring
338+
Adds a task to the manager, using a full task definition (including dependency
339+
handling). Ownership of the task is transferred to the manager, and the task
340+
manager will be responsible for starting the task. The priority argument can
341+
be used to control the run queue's order of execution, with larger numbers
342+
taking precedence over lower priority numbers.
343+
:return: unique task ID
344+
:rtype: long
345+
%End
279346

280-
281-
/** Returns the task with matching ID.
282-
* @param id task ID
283-
* @returns task if found, or nullptr
284-
*/
285347
QgsTask *task( long id ) const;
348+
%Docstring
349+
Returns the task with matching ID.
350+
\param id task ID
351+
:return: task if found, or None
352+
:rtype: QgsTask
353+
%End
286354

287-
/** Returns all tasks tracked by the manager.
288-
*/
289-
QList<QgsTask*> tasks() const;
355+
QList<QgsTask *> tasks() const;
356+
%Docstring
357+
Returns all tasks tracked by the manager.
358+
:rtype: list of QgsTask
359+
%End
290360

291-
//! Returns the number of tasks tracked by the manager.
292361
int count() const;
362+
%Docstring
363+
Returns the number of tasks tracked by the manager.
364+
:rtype: int
365+
%End
293366

294-
/** Returns the unique task ID corresponding to a task managed by the class.
295-
* @param task task to find
296-
* @returns task ID, or -1 if task not found
297-
*/
298367
long taskId( QgsTask *task ) const;
368+
%Docstring
369+
Returns the unique task ID corresponding to a task managed by the class.
370+
\param task task to find
371+
:return: task ID, or -1 if task not found
372+
:rtype: long
373+
%End
299374

300-
//! Instructs all tasks tracked by the manager to terminate.
301375
void cancelAll();
376+
%Docstring
377+
Instructs all tasks tracked by the manager to terminate. Individual tasks may take some time
378+
to cancel, or may totally ignore this instruction. Calling this does not block
379+
but will instead signal the tasks to cancel and then return immediately.
380+
%End
302381

303-
//! Returns true if all dependencies for the specified task are satisfied
304382
bool dependenciesSatisfied( long taskId ) const;
383+
%Docstring
384+
Returns true if all dependencies for the specified task are satisfied
385+
:rtype: bool
386+
%End
305387

306-
//! Returns the set of task IDs on which a task is dependent
307-
//! @note not available in Python bindings
308-
//QSet< long > dependencies( long taskId ) const;
309388

310-
QList< QgsMapLayer* > dependentLayers( long taskId ) const;
389+
QList< QgsMapLayer * > dependentLayers( long taskId ) const;
390+
%Docstring
391+
Returns a list of layers on which as task is dependent. The task will automatically
392+
be canceled if any of these layers are above to be removed.
393+
\param taskId task ID
394+
:return: list of layers
395+
.. seealso:: tasksDependentOnLayer()
396+
:rtype: list of QgsMapLayer
397+
%End
311398

312-
QList< QgsTask* > tasksDependentOnLayer( QgsMapLayer *layer ) const;
399+
QList< QgsTask * > tasksDependentOnLayer( QgsMapLayer *layer ) const;
400+
%Docstring
401+
Returns a list of tasks which depend on a layer.
402+
.. seealso:: dependentLayers()
403+
:rtype: list of QgsTask
404+
%End
313405

314-
/** Returns a list of the active (queued or running) tasks.
315-
* @see countActiveTasks()
316-
*/
317-
QList< QgsTask* > activeTasks() const;
406+
QList< QgsTask * > activeTasks() const;
407+
%Docstring
408+
Returns a list of the active (queued or running) tasks.
409+
.. seealso:: countActiveTasks()
410+
:rtype: list of QgsTask
411+
%End
318412

319-
/** Returns the number of active (queued or running) tasks.
320-
* @see activeTasks()
321-
* @see countActiveTasksChanged()
322-
*/
323413
int countActiveTasks() const;
414+
%Docstring
415+
Returns the number of active (queued or running) tasks.
416+
.. seealso:: activeTasks()
417+
.. seealso:: countActiveTasksChanged()
418+
:rtype: int
419+
%End
324420

325421
signals:
326422

327-
//! Will be emitted when a task reports a progress change
328-
//! @param taskId ID of task
329-
//! @param progress percent of progress, from 0.0 - 100.0
330423
void progressChanged( long taskId, double progress );
424+
%Docstring
425+
\param progress percent of progress, from 0.0 - 100.0
426+
%End
331427

332-
//! Will be emitted when only a single task remains to complete
333-
//! and that task has reported a progress change
334-
//! @param progress percent of progress, from 0.0 - 100.0
335428
void finalTaskProgressChanged( double progress );
429+
%Docstring
430+
\param progress percent of progress, from 0.0 - 100.0
431+
%End
336432

337-
//! Will be emitted when a task reports a status change
338-
//! @param taskId ID of task
339-
//! @param status new task status
340433
void statusChanged( long taskId, int status );
434+
%Docstring
435+
\param status new task status
436+
%End
341437

342-
//! Emitted when a new task has been added to the manager
343-
//! @param taskId ID of task
344438
void taskAdded( long taskId );
439+
%Docstring
440+
\param taskId ID of task
441+
%End
345442

346-
//! Emitted when a task is about to be deleted
347-
//! @param taskId ID of task
348443
void taskAboutToBeDeleted( long taskId );
444+
%Docstring
445+
\param taskId ID of task
446+
%End
349447

350-
//! Emitted when all tasks are complete
351-
//! @see countActiveTasksChanged()
352448
void allTasksFinished();
449+
%Docstring
450+
.. seealso:: countActiveTasksChanged()
451+
%End
353452

354-
//! Emitted when the number of active tasks changes
355-
//! @see countActiveTasks()
356453
void countActiveTasksChanged( int count );
454+
%Docstring
455+
.. seealso:: countActiveTasks()
456+
%End
357457

358458
};
459+
460+
/************************************************************************
461+
* This file has been generated automatically from *
462+
* *
463+
* src/core/qgstaskmanager.h *
464+
* *
465+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
466+
************************************************************************/

‎src/core/qgstaskmanager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class CORE_EXPORT QgsTask : public QObject
169169
* Subtasks can be nested, ie a subtask can legally be a parent task itself with
170170
* its own set of subtasks.
171171
*/
172-
void addSubTask( QgsTask *subTask, const QgsTaskList &dependencies = QgsTaskList(),
172+
void addSubTask( QgsTask *subTask SIP_TRANSFER, const QgsTaskList &dependencies = QgsTaskList(),
173173
SubTaskDependency subTaskDependency = SubTaskIndependent );
174174

175175
/**

0 commit comments

Comments
 (0)
Please sign in to comment.