limit the scope of the text cursor, so it's deleted before the mutex unlock

svn path=/trunk/KDE/kdegraphics/okular/; revision=805246
This commit is contained in:
Pino Toscano 2008-05-07 23:04:01 +00:00
parent 5c09d64596
commit 6cf2d5786e

View file

@ -68,6 +68,7 @@ Okular::TextPage* TextDocumentGeneratorPrivate::createTextPage( int pageNumber )
#endif
Utils::calculatePositions( mDocument, pageNumber, start, end );
{
QTextCursor cursor( mDocument );
for ( int i = start; i < end - 1; ++i ) {
cursor.setPosition( i );
@ -83,6 +84,7 @@ Okular::TextPage* TextDocumentGeneratorPrivate::createTextPage( int pageNumber )
textPage->append( text, new Okular::NormalizedRect( rect.left(), rect.top(), rect.right(), rect.bottom() ) );
}
}
}
#ifdef OKULAR_TEXTDOCUMENT_THREADED_RENDERING
q->userMutex()->unlock();
#endif