mapper->setMapping(&thread1, 1);
mapper->setMapping(&thread2, 2);
mapper->setMapping(&thread3, 3);
mapper->setMapping(&thread4, 4);
connect(&thread1, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread2, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread3, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread4, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(mapper, SIGNAL(mapped(int)), this, SLOT(serverDisconnectDone(int)));
QSignalMapper* mapper = new QSignalMapper(this);
mapper->setMapping(&thread1, 1);
mapper->setMapping(&thread2, 2);
mapper->setMapping(&thread3, 3);
mapper->setMapping(&thread4, 4);
connect(&thread1, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread2, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread3, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(&thread4, SIGNAL(logoffDone()), mapper, SLOT(map()));
connect(mapper, SIGNAL(mapped(int)), this, SLOT(serverDisconnectDone(int)));
To copy to clipboard, switch view to plain text mode
Bookmarks