Fix overload documentation for AsyncInvoke in replay manager

* Python can't properly document fully independent overloads, only default-
  parameter type overloads. Moving the tag to last as an optional parameter
  means we can eliminate the different variants.
* For cleanliness in C++ code we make an internal variant that swaps the
  parameters, since it is much cleaner to have a lambda callback as the last
  parameter.
This commit is contained in:
baldurk
2026-08-13 17:46:46 +01:00
parent 6e2069ec54
commit 00159dafac
3 changed files with 21 additions and 23 deletions
+1 -9
View File
@@ -252,7 +252,7 @@ QString ReplayManager::GetCurrentProcessingTag()
return m_CommandTag;
}
void ReplayManager::AsyncInvoke(const rdcstr &tag, ReplayManager::ReplayInvokeCallback m)
void ReplayManager::AsyncInvoke(ReplayManager::ReplayInvokeCallback m, rdcstr tag)
{
QString qtag;
@@ -282,14 +282,6 @@ void ReplayManager::AsyncInvoke(const rdcstr &tag, ReplayManager::ReplayInvokeCa
PushInvoke(cmd);
}
void ReplayManager::AsyncInvoke(ReplayManager::ReplayInvokeCallback m)
{
InvokeHandle *cmd = new InvokeHandle(m);
cmd->selfdelete = true;
PushInvoke(cmd);
}
void ReplayManager::BlockInvoke(ReplayManager::ReplayInvokeCallback m)
{
if(IsRunning() && m_Thread->isCurrentThread())