rem: QDataStream arg(data, IO_WriteOnly);
add: QDataStream arg(data, QIODevice::WriteOnly);
context: int main(int argc, char **argv){	FUNCTIONSETUP;	KLocale::setMainCatalog("kpilot");	KAboutData about("kpilotDaemon",		I18N_NOOP("KPilot Daemon"),		KPILOT_VERSION,		"KPilot - HotSync software for KDE\n\n",		KAboutData::License_GPL,		"(c) 1998-2000,2001, Dan Pilone (c) 2000-2004, Adriaan de Groot",		0L,		"http://www.kpilot.org/"		);	about.addAuthor("Dan Pilone",		I18N_NOOP("Project Leader"),		"pilone@slac.com");	about.addAuthor("Adriaan de Groot",		I18N_NOOP("Maintainer"),		"groot@kde.org", "http://www.cs.kun.nl/~adridg/");	about.addAuthor("Reinhold Kainhofer",		I18N_NOOP("Developer"),		"reinhold@kainhofer.com", "http://reinhold.kainhofer.com/Linux/");	aboutData = &about;	KCmdLineArgs::init(argc, argv, &about);	KCmdLineArgs::addCmdLineOptions(daemonoptions,"kpilotconfig");	KUniqueApplication::addCmdLineOptions();	KCmdLineArgs *p = KCmdLineArgs::parsedArgs();#ifdef DEBUG	KPilotConfig::getDebugLevel(p);#endif	if (!KUniqueApplication::start())	{		if (p->isSet("device")){			// tell the running kpilotDaemon to use			// this device now			DCOPClient d;			QString dev(p->getOption("device"));			QByteArray data;			QDataStream arg(data, IO_WriteOnly);			arg << dev;			if (d.attach()){				d.send("kpilotDaemon", "KPilotDaemonIface", "setTempDevice(QString)", data );				d.detach();			}		}		return 0;	}	KUniqueApplication a(true, true);	// A block just to keep variables local.	//	//	{//		KPilotSettings::self()->config()->setReadOnly(false);		if (KPilotSettings::configVersion() < KPilotConfig::ConfigurationVersion)		{			kdError() << k_funcinfo				<< ": Is still not configured for use."				<< endl;			if (!p->isSet("fail-silently"))			{				KPilotConfig::sorryVersionOutdated(KPilotSettings::configVersion());			}			return 1;		}#ifdef DEBUG		DEBUGDAEMON << fname			<< ": Configuration version "			<< KPilotSettings::configVersion() << endl;#endif	}	PilotDaemon *gPilotDaemon = new PilotDaemon();	if (p->isSet("device"))		gPilotDaemon->setTempDevice(p->getOption("device"));	if (gPilotDaemon->status() == PilotDaemon::ERROR)	{		delete gPilotDaemon;		gPilotDaemon = 0;		kdError() << k_funcinfo			<< ": **\n"			": Failed to start up daemon\n"			": due to errors constructing it.\n" ": **" << endl;		return 2;	}	gPilotDaemon->showTray();	return a.exec();	/* NOTREACHED */	(void) pilotdaemon_id;}