rem: win = windowList->take();
add: win = KTopLevelWidget::memberList->take();
context: static void setSignalHandler(void (*handler)(int));static void recoverDeadLetters(void);static void processArgs(int argc, char *argv[]);//-----------------------------------------------------------------------------// Message handlerstatic void kmailMsgHandler(QtMsgType aType, const char* aMsg){  QString appName = app->appName();  QString msg = aMsg;  msg.detach();  switch (aType)  {  case QtDebugMsg:    kdebug(KDEBUG_INFO, 0, msg);    break;  case QtWarningMsg:    fprintf(stderr, "%s: %s\n", (const char*)app->appName(), msg.data());    if (strncmp(aMsg,"KCharset:",9) != 0 &&	strncmp(aMsg,"QGManager:",10) != 0)    {      KMsgBox::message(NULL, appName+" "+i18n("warning"), msg.data(), 		       KMsgBox::EXCLAMATION);    }    break;  case QtFatalMsg:    fprintf(stderr, appName+" "+i18n("fatal error")+": %s\n", msg.data());    KMsgBox::message(NULL, appName+" "+i18n("fatal error"),		     aMsg, KMsgBox::STOP);    abort();  }}//-----------------------------------------------------------------------------// Crash recovery signal handlerstatic void signalHandler(int sigId){  QWidget* win;  fprintf(stderr, "*** KMail got signal %d\n", sigId);  // try to cleanup all windows  while (windowList->first() != NULL)  {    win = windowList->take();    if (win->inherits("KMComposeWin")) ((KMComposeWin*)win)->deadLetter();    delete win;  }  // If KMail crashes again below this line we consider the data lost :-|  // Otherwise KMail will end in an infinite loop.  setSignalHandler(SIG_DFL);  cleanup();  exit(1);}//-----------------------------------------------------------------------------static void setSignalHandler(void (*handler)(int)){  signal(SIGSEGV, handler);  signal(SIGKILL, handler);  signal(SIGTERM, handler);  signal(SIGHUP,  handler);  signal(SIGFPE,  handler);  signal(SIGABRT, handler);}