rem: KCmdLineArgs::addCmdLineOptions(kpilotoptions);
add: KCmdLineArgs::addCmdLineOptions(kpilotoptions,"test","test"); #ifdef DEBUG KCmdLineArgs::addCmdLineOptions(debug_options,"debug","debug","test"); #endif
context: int main(int argc, char **argv){	KAboutData about("kpilotTest",		I18N_NOOP("KPilotTest"),		KPILOT_VERSION,		"KPilot Tester",		KAboutData::License_GPL,		"(C) 2001, Adriaan de Groot");	about.addAuthor("Adriaan de Groot",		I18N_NOOP("KPilot Maintainer"),		"groot@kde.org",		"http://www.cs.kun.nl/~adridg/kpilot/");		KCmdLineArgs::init(argc,argv,&about);	KCmdLineArgs::addCmdLineOptions(kpilotoptions);	KApplication::addCmdLineOptions();	KCmdLineArgs *p = KCmdLineArgs::parsedArgs();	QString devicePath = p->getOption("port");	if (devicePath.isEmpty())	{		devicePath = "/dev/pilot";	}	KPilotDeviceLink::DeviceType deviceType = 		KPilotDeviceLink::OldStyleUSB;	KApplication  a;	KPilotConfig::getDebugLevel(p);	LogWidget *w = new LogWidget(0L);	w->resize(300,300);	w->show();	w->setShowTime(true);	a.setMainWidget(w);	KPilotDeviceLink *t = KPilotDeviceLink::init(0,"deviceLink");	SyncAction *l = 0L;	if (p->isSet("backup"))	{		l = new BackupAction(t);	}	else if (p->isSet("restore"))	{		l = new RestoreAction(t);	}	else	{		l = new TestLink(t);	}	QObject::connect(t,SIGNAL(logError(const QString &)),		w,SLOT(addError(const QString &)));	QObject::connect(t,SIGNAL(logMessage(const QString &)),		w,SLOT(addMessage(const QString &)));	QObject::connect(t,SIGNAL(deviceReady()),		l,SLOT(exec()));	QObject::connect(l,SIGNAL(syncDone(SyncAction *)),		w,SLOT(syncDone()));	QObject::connect(l,SIGNAL(syncDone(SyncAction *)),		t,SLOT(close()));	t->reset(deviceType,devicePath);	return a.exec();	/* NOTREACHED */	(void) test_id;}