From ec385777e6f245e6e5ee77d43f377b86a44250b1 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 15 May 2006 21:31:53 +0000 Subject: [PATCH] IO_ReadOnly -> QIODevice::ReadOnly svn path=/branches/work/kde4/playground/graphics/okular/; revision=541290 --- core/document.cpp | 8 ++++---- shell/shell.cpp | 2 +- ui/newstuff.cpp | 2 +- ui/pageviewannotator.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/document.cpp b/core/document.cpp index 5510d8c8a..5b6a3b9b2 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -136,7 +136,7 @@ bool KPDFDocument::openDocument( const QString & docFile, const KUrl& url, const { // docFile is always local so we can use QFile on it QFile fileReadTest( docFile ); - if ( !fileReadTest.open( IO_ReadOnly ) ) + if ( !fileReadTest.open( QIODevice::ReadOnly ) ) { d->docFileName.clear(); return false; @@ -1373,7 +1373,7 @@ int KPDFDocument::getTotalMemory() #ifdef __linux__ // if /proc/meminfo doesn't exist, return 128MB QFile memFile( "/proc/meminfo" ); - if ( !memFile.open( IO_ReadOnly ) ) + if ( !memFile.open( QIODevice::ReadOnly ) ) return (cachedValue = 134217728); // read /proc/meminfo and sum up the contents of 'MemFree', 'Buffers' @@ -1394,7 +1394,7 @@ int KPDFDocument::getFreeMemory() #ifdef __linux__ // if /proc/meminfo doesn't exist, return MEMORY FULL QFile memFile( "/proc/meminfo" ); - if ( !memFile.open( IO_ReadOnly ) ) + if ( !memFile.open( QIODevice::ReadOnly ) ) return 0; // read /proc/meminfo and sum up the contents of 'MemFree', 'Buffers' @@ -1427,7 +1427,7 @@ void KPDFDocument::loadDocumentInfo() { //kDebug() << "Using '" << d->xmlFileName << "' as document info file." << endl; QFile infoFile( d->xmlFileName ); - if ( !infoFile.exists() || !infoFile.open( IO_ReadOnly ) ) + if ( !infoFile.exists() || !infoFile.open( QIODevice::ReadOnly ) ) return; // Load DOM from XML file diff --git a/shell/shell.cpp b/shell/shell.cpp index a64f9027e..d6cc2ad68 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -295,7 +295,7 @@ bool Shell::handleCompressed(KUrl & url, const QString &path, const KMimeType::P return false; } - if ( !filterDev->open(IO_ReadOnly) ) + if ( !filterDev->open(QIODevice::ReadOnly) ) { KMessageBox::detailedError( this, i18n("File Error! Could not open the file " diff --git a/ui/newstuff.cpp b/ui/newstuff.cpp index ccb294a33..af0c82d24 100644 --- a/ui/newstuff.cpp +++ b/ui/newstuff.cpp @@ -892,7 +892,7 @@ void NewStuffDialog::slotItemResult( KIO::Job * job ) /* UNCOMPRESS (specify uncompression method) KTar tar( fileName, "application/x-gzip" ); - tar.open( IO_ReadOnly ); + tar.open( QIODevice::ReadOnly ); const KArchiveDirectory *dir = tar.directory(); dir->copyTo( "somedir" ); tar.close(); diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp index 1980bfc3b..f81c91f1d 100644 --- a/ui/pageviewannotator.cpp +++ b/ui/pageviewannotator.cpp @@ -371,7 +371,7 @@ PageViewAnnotator::PageViewAnnotator( PageView * parent, KPDFDocument * storage { // load the tools from the 'xml tools definition' file. store the tree internally. QFile infoFile( locate("data", "oKular/tools.xml") ); - if ( infoFile.exists() && infoFile.open( IO_ReadOnly ) ) + if ( infoFile.exists() && infoFile.open( QIODevice::ReadOnly ) ) { QDomDocument doc( "annotatingTools" ); if ( doc.setContent( &infoFile ) )