You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add method to take results from another processing context and
add to the current context
With appropriate note and tests to ensure that both the current
context and that which the results being taken from share the
same thread affinity
Copy file name to clipboardExpand all lines: src/core/processing/qgsprocessingcontext.h
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -340,10 +340,29 @@ class CORE_EXPORT QgsProcessingContext
340
340
*/
341
341
voidpushToThread( QThread *thread )
342
342
{
343
-
Q_ASSERTX( QThread::currentThread() == thread(), "QgsProcessingContext::pushToThread", "Cannot push context to another thread unless the current thread matches the existing context thread affinity" );
343
+
Q_ASSERT_X( QThread::currentThread() == QgsProcessingContext::thread(), "QgsProcessingContext::pushToThread", "Cannot push context to another thread unless the current thread matches the existing context thread affinity" );
344
344
tempLayerStore.moveToThread( thread );
345
345
}
346
346
347
+
/**
348
+
* Takes the results from another \a context and merges them with the results currently
349
+
* stored in this context. This includes settings like any layers loaded in the temporaryLayerStore()
350
+
* and layersToLoadOnCompletion().
351
+
* This is only safe to call when both this context and the other \a context share the same
352
+
* thread() affinity, and that thread is the current thread.
0 commit comments