IO_ReadOnly -> QIODevice::ReadOnly

svn path=/branches/work/kde4/playground/graphics/okular/; revision=541290
This commit is contained in:
Pino Toscano 2006-05-15 21:31:53 +00:00
parent f1cd775633
commit ec385777e6
4 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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("<qt><strong>File Error!</strong> Could not open the file "

View file

@ -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();

View file

@ -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 ) )