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.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 9b757f7..b8c2aa7 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -22,12 +22,12 @@
#include <qdatetime.h>
#include <qstring.h>
#include <qapplication.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include <qregexp.h>
#include <qmessagebox.h>
#include <qclipboard.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qtextcodec.h>
#include <qxml.h>
#include <qlabel.h>
@@ -366,11 +366,11 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
}
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
text = ts.read();
file.close();
@@ -388,7 +388,7 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
fileName = "/tmp/todo.txt";
}
file.setName( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return false;
}
@@ -475,7 +475,7 @@ bool SharpFormat::save( Calendar *calendar)
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();
+ Q3PtrList<Event> er = calendar->rawEvents();
Event* ev = er.first();
QString fileName = "/tmp/kopitempout";
int i = 0;
@@ -503,10 +503,10 @@ bool SharpFormat::save( Calendar *calendar)
else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new
QString fileNameIn = "/tmp/kopitempin";
QFile fileIn( fileNameIn );
- if (!fileIn.open( IO_WriteOnly ) ) {
+ if (!fileIn.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream tsIn( &fileIn );
+ Q3TextStream tsIn( &fileIn );
tsIn.setCodec( QTextCodec::codecForName("utf8") );
tsIn << ePrefix << eString ;
fileIn.close();
@@ -517,11 +517,11 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("command -------- ");
system ( command.utf8() );
QFile file( fileName );
- if (!file.open( IO_ReadOnly ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
answer = ts.read();
file.close();
@@ -544,11 +544,11 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("changing... ");
if ( changeEnt ) {
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
ts << changeString ;
file.close();
@@ -562,11 +562,11 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("deleting... ");
if ( deleteEnt ) {
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
ts << deleteString;
file.close();
@@ -580,7 +580,7 @@ bool SharpFormat::save( Calendar *calendar)
deleteString = tPrefix;
status.setText ( i18n("Processing todos ...") );
qApp->processEvents();
- QPtrList<Todo> tl = calendar->rawTodos();
+ Q3PtrList<Todo> tl = calendar->rawTodos();
Todo* to = tl.first();
i = 0;
message = i18n("Processing todo # ");
@@ -605,20 +605,20 @@ bool SharpFormat::save( Calendar *calendar)
QString fileNameIn = "/tmp/kopitempin";
QFile fileIn( fileNameIn );
- if (!fileIn.open( IO_WriteOnly ) ) {
+ if (!fileIn.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream tsIn( &fileIn );
+ Q3TextStream 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 ) ) {
+ if (!file.open( QIODevice::ReadOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
answer = ts.read();
file.close();
@@ -642,11 +642,11 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("changing... ");
if ( changeEnt ) {
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
ts << changeString ;
file.close();
@@ -660,11 +660,11 @@ bool SharpFormat::save( Calendar *calendar)
//qDebug("deleting... ");
if ( deleteEnt ) {
QFile file( fileName );
- if (!file.open( IO_WriteOnly ) ) {
+ if (!file.open( QIODevice::WriteOnly ) ) {
return false;
}
- QTextStream ts( &file );
+ Q3TextStream ts( &file );
ts.setCodec( QTextCodec::codecForName("utf8") );
ts << deleteString;
file.close();
@@ -783,7 +783,7 @@ QString SharpFormat::getEventString( Event* event )
writeEndDate = true;
{
int count = 1;
- QPtrList<Recurrence::rMonthPos> rmp;
+ Q3PtrList<Recurrence::rMonthPos> rmp;
rmp = rec->monthPositions();
if ( rmp.first()->negative )
count = 5 - rmp.first()->rPos - 1;