-rw-r--r-- | libkcal/qtopiaformat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 0a4a031..2dfe1a4 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -1,52 +1,52 @@ /* This file is part of libkcal. Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qclipboard.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qxml.h> #include <kdebug.h> #include <klocale.h> #include "calendar.h" #include "calendarlocal.h" #include "qtopiaformat.h" using namespace KCal; class QtopiaParser : public QXmlDefaultHandler { public: QtopiaParser( Calendar *calendar ) : mCalendar( calendar ) { oldCategories = 0; } bool startElement( const QString &, const QString &, const QString & qName, const QXmlAttributes &attributes ) { if ( qName == "event" ) { Event *event = new Event; @@ -288,46 +288,46 @@ bool QtopiaFormat::load( Calendar *calendar, const QString &fileName ) { clearException(); // qDebug("load QtopiaFormat: %s ",fileName.latin1() ); QtopiaParser handler( calendar ); handler.setCategoriesList( mCategories ); QFile xmlFile( fileName ); QXmlInputSource source( xmlFile ); QXmlSimpleReader reader; reader.setContentHandler( &handler ); return reader.parse( source ); } bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) { clearException(); QString text = toString( calendar ); if ( text.isNull() ) return false; // TODO: write backup file QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, i18n("Could not open file '%1'").arg(fileName))); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; file.close(); return true; } bool QtopiaFormat::fromString( Calendar *, const QString & ) { return false; } QString QtopiaFormat::toString( Calendar * ) { return QString::null; } |