Have created a slot like shown below, in order to do something when a worker thread is done, but it must know which one finished:
Qt Code:
  1. void ProgramMain::serverDisconnectDone(int thread) {
  2.  
  3. }
To copy to clipboard, switch view to plain text mode 

Since I know what signal comes from what thread, I wanted to connect them in this way:
Qt Code:
  1. connect(&thread1, SIGNAL(logoffDone()), this, SLOT(serverDisconnectDone(1)));
  2. connect(&thread2, SIGNAL(logoffDone()), this, SLOT(serverDisconnectDone(2)));
  3. connect(&thread3, SIGNAL(logoffDone()), this, SLOT(serverDisconnectDone(3)));
  4. connect(&thread4, SIGNAL(logoffDone()), this, SLOT(serverDisconnectDone(4)));
To copy to clipboard, switch view to plain text mode 

When I execute my program I get the error:
Object::connect: No such slot ProgramMain::serverDisconnectDone(1)
Object::connect: (receiver name: 'ProgramMain')
Object::connect: No such slot ProgramMain::serverDisconnectDone(2)
Object::connect: (receiver name: 'ProgramMain')
Object::connect: No such slot ProgramMain::serverDisconnectDone(3)
Object::connect: (receiver name: 'ProgramMain')
Object::connect: No such slot ProgramMain::serverDisconnectDone(4)
Object::connect: (receiver name: 'ProgramMain')
I know that there are more complicated ways that I could make this work, but the easiest way is to just force the argument in the signal slot connection. Is there any way that I can do this?