Commit ef8a4b9a authored by Pino Toscano's avatar Pino Toscano

be sure to close the file before sending it for printing

svn path=/trunk/KDE/kdegraphics/okular/; revision=875559
parent a8ea861f
...@@ -206,15 +206,15 @@ bool DjVuGenerator::print( QPrinter& printer ) ...@@ -206,15 +206,15 @@ bool DjVuGenerator::print( QPrinter& printer )
if ( m_djvu->exportAsPostScript( &tf, pageList ) ) if ( m_djvu->exportAsPostScript( &tf, pageList ) )
{ {
tf.setAutoRemove( false ); tf.setAutoRemove( false );
int ret = Okular::FilePrinter::printFile( printer, tf.fileName(), const QString fileName = tf.fileName();
tf.close();
int ret = Okular::FilePrinter::printFile( printer, fileName,
Okular::FilePrinter::SystemDeletesFiles, Okular::FilePrinter::SystemDeletesFiles,
Okular::FilePrinter::ApplicationSelectsPages, Okular::FilePrinter::ApplicationSelectsPages,
document()->bookmarkedPageRange() ); document()->bookmarkedPageRange() );
result = ( ret >=0 ); result = ( ret >=0 );
} }
tf.close();
return result; return result;
} }
......
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