From 12068392f1d131c3f599b8854fe131dd9291a5ea Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 28 Oct 2004 13:13:08 +0000 Subject: fixed todo DTM sync --- (limited to 'libkcal/sharpformat.cpp') diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index d56eab6..b88e729 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -634,12 +634,23 @@ bool SharpFormat::save( Calendar *calendar) changeEnt = true; } else if ( to->getID("Sharp_DTM").isEmpty() ) { // add new - command = "(echo \"" + tPrefix + eString + "\" ) | db2file todo -w -g -c " + codec+ " > "+ fileName; + + + + QString fileNameIn = "/tmp/kopitempin"; + QFile fileIn( fileNameIn ); + if (!fileIn.open( IO_WriteOnly ) ) { + return false; + } + QTextStream tsIn( &fileIn ); + tsIn.setCodec( QTextCodec::codecForName("utf8") ); + tsIn << tPrefix << eString ; + fileIn.close(); + command = "(cat /tmp/kopitempin | db2file todo -w -g -c " + codec+ ") > "+ fileName; system ( command.utf8() ); QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { return false; - } QTextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); -- cgit v0.9.0.2