int main(int argc, char **argv) { KAboutData about("broadkast", I18N_NOOP("BroadKast"), version, description, KAboutData::License_GPL, "(C) 2006 Pier-Olivier Thibault", 0, 0, "ximaginex@gmail.com"); about.addAuthor( "Pier-Olivier Thibault", 0, "ximaginex@gmail.com" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; if (app.isRestored()) { RESTORE(BroadKast); } else { // no session.. just start up normally KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); /// @todo do something with the command line args here BroadKast *dialog = new BroadKast; app.setMainWidget( BroadKast ); BroadKast->show(); args->clear(); } // mainWin has WDestructiveClose flag by default, so it will delete itself. return app.exec(); }