Commit ec385777 authored by Pino Toscano's avatar Pino Toscano

IO_ReadOnly -> QIODevice::ReadOnly

svn path=/branches/work/kde4/playground/graphics/okular/; revision=541290
parent f1cd7756
......@@ -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
......
......@@ -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 "
......
......@@ -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();
......
......@@ -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 ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment