summaryrefslogtreecommitdiffabout
path: root/libkcal/sharpformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/sharpformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/sharpformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index defdb09..820d068 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -486,49 +486,49 @@ int SharpFormat::getNumFromRecord( QString answer, Incidence* inc )
return retval;
}
bool SharpFormat::save( Calendar *calendar)
{
QLabel status ( i18n("Processing/adding events ..."), 0 );
int w = status.sizeHint().width()+20 ;
if ( w < 200 ) w = 200;
int h = status.sizeHint().height()+20 ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
status.setCaption(i18n("Writing DTM Data") );
status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
status.show();
status.raise();
qApp->processEvents();
bool debug = DEBUGMODE;
QString codec = "utf8";
QString answer;
QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n";
QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n";
QString command;
QPtrList<Event> er = calendar->rawEvents();
Event* ev = er.first();
- QString fileName = "/tmp/kopitempout";
+ QString fileName = "/tmp/kdepimtempfile";
int i = 0;
QString changeString = ePrefix;
QString deleteString = ePrefix;
bool deleteEnt = false;
bool changeEnt = false;
QString message = i18n("Processing event # ");
int procCount = 0;
while ( ev ) {
//qDebug("i %d ", ++i);
if ( ev->tempSyncStat() != SYNC_TEMPSTATE_NEW_EXTERNAL ) {
status.setText ( message + QString::number ( ++procCount ) );
qApp->processEvents();
QString eString = getEventString( ev );
if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { // delete
// deleting empty strings does not work.
// we write first and x and then delete the record with the x
eString = eString.replace( QRegExp(",\"\""),",\"x\"" );
changeString += eString + "\n";
deleteString += eString + "\n";
deleteEnt = true;
changeEnt = true;
}
else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new
command = "(echo \"" + ePrefix + eString + "\" ) | db2file datebook -w -g -c " + codec+ " > "+ fileName;