rem: QObject::connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) );
context: int main( int argc, char** argv ){  AboutData aboutData;  KCmdLineArgs::init(argc, argv, &aboutData);  static const KCmdLineOptions options[] = {            { "+name", I18N_NOOP("The name of the plugin"), 0 },            { "+lib" , I18N_NOOP("The library of the plugin"), 0 },            { "external" , I18N_NOOP("Search for external certificates initially"), 0 },            { "query " , I18N_NOOP("Initial query string"), 0 },	    { "import-certificate ", I18N_NOOP("Name of certificte file to import"), 0 },	    KCmdLineLastOption// End of options.  };  KCmdLineArgs::addCmdLineOptions( options );  KApplication app;  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();  if( !Kleo::CryptPlugFactory::instance()->smime() ) {    KMessageBox::error(0,			i18n( "<qt>The crypto plugin could not be initialized.<br>"			      "Certificate Manager will terminate now.</qt>") );    return -2;  }  CertManager* manager = new CertManager( args->isSet("external"),					  QString::fromLocal8Bit(args->getOption("query")),					  QString::fromLocal8Bit(args->getOption("import-certificate")) );  args->clear();  manager->show();  QObject::connect( qApp, SIGNAL( lastWindowClosed() ), qApp, SLOT( quit() ) );  return app.exec();}