From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kabc/plugins/file/resourcefile.cpp') diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index dad4571..3ed850c 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -201,13 +201,13 @@ bool ResourceFile::doOpen() if ( !file.exists() ) { // try to create the file - bool ok = file.open( IO_WriteOnly ); + bool ok = file.open( QIODevice::WriteOnly ); if ( ok ) file.close(); return ok; } else { - if ( !file.open( IO_ReadWrite ) ) + if ( !file.open( QIODevice::ReadWrite ) ) return false; if ( file.size() < 10 ) { @@ -230,7 +230,7 @@ bool ResourceFile::load() { QFile file( fileName() ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); return false; } @@ -311,7 +311,7 @@ bool ResourceFile::save( Ticket *ticket ) } QFile info; info.setName( fileName() ); - bool ok = info.open( IO_WriteOnly ); + bool ok = info.open( QIODevice::WriteOnly ); if ( ok ) { mFormat->saveAll( addressBook(), this, &info ); @@ -363,7 +363,7 @@ bool ResourceFile::lock( const QString &fileName ) // Create unique file QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); // Create lock file -- cgit v0.9.0.2